Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CorrMM images and kernel must have the same stack size #3

Open
seaofglass opened this issue Apr 29, 2019 · 0 comments
Open

CorrMM images and kernel must have the same stack size #3

seaofglass opened this issue Apr 29, 2019 · 0 comments

Comments

@seaofglass
Copy link

I don't know what kind of error is this?

I upgraded keras below address.
https://github.com/jayanthkoushik/keras.git.

And also patched a code like this :
out = Conv2D(nb_filter, filter_length, filter_length, subsample=(subsample, subsample), border_mode="valid",dim_ordering='th')(out)

and then edited ~/.keras/keras.json file.

"dim_ordering": "th"

python fast_neural_style.py eval --content-image tubingen.jpg --output-image out.jpg --model test.h5

Using Theano backend.
Traceback (most recent call last):
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else
ValueError: CorrMM images and kernel must have the same stack size

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "fast_neural_style.py", line 168, in
output_image = get_Xtr()
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/theano/compile/function_module.py", line 917, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else
ValueError: CorrMM images and kernel must have the same stack size

Apply node that caused the error: CorrMM{valid, (1, 1), (1, 1), 1 False}(IncSubtensor{InplaceSet;::, ::, int64::, int64::}.0, Subtensor{::, ::, ::int64, ::int64}.0)
Toposort index: 479
Inputs types: [TensorType(float32, 4D), TensorType(float32, 4D)]
Inputs shapes: [(1, 256, 386, 258), (64, 128, 3, 3)]
Inputs strides: [(101978112, 398352, 1032, 4), (4608, 36, -12, -4)]
Inputs values: ['not shown', 'not shown']
Outputs clients: [[Elemwise{add,no_inplace}(CorrMM{valid, (1, 1), (1, 1), 1 False}.0, InplaceDimShuffle{x,0,x,x}.0)]]

Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "fast_neural_style.py", line 56, in
transformer_net = get_transformer_net(X, weights)
File "/Users/seaofglass/neoart/app/neuralstyle/transformer_net.py", line 88, in get_transformer_net
y = conv_layer(y, 64, 3, upsample=2)
File "/Users/seaofglass/neoart/app/neuralstyle/transformer_net.py", line 65, in conv_layer
out = Conv2D(nb_filter, filter_length, filter_length, subsample=(subsample, subsample), border_mode="valid", dim_ordering='th')(out)
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/keras/engine/topology.py", line 569, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/keras/engine/topology.py", line 632, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/keras/engine/topology.py", line 164, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/keras/layers/convolutional.py", line 442, in call
filter_shape=self.W_shape)
File "/Users/seaofglass/anaconda/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1488, in conv2d
filter_shape=filter_shape)

HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant