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

ValueError: Dimensions must be equal, but are 27 and 26 #14

Open
sumitcoder1 opened this issue Aug 13, 2018 · 0 comments
Open

ValueError: Dimensions must be equal, but are 27 and 26 #14

sumitcoder1 opened this issue Aug 13, 2018 · 0 comments

Comments

@sumitcoder1
Copy link

Traceback (most recent call last):

File "", line 1, in
runfile('C:/Users/Lab PC/Documents/PythonWorkspace/convnets-keras-master/test.py', wdir='C:/Users/Lab PC/Documents/PythonWorkspace/convnets-keras-master')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 678, in runfile
execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 106, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Lab PC/Documents/PythonWorkspace/convnets-keras-master/test.py", line 14, in
model = convnet('alexnet',weights_path="weights/alexnet_weights.h5", heatmap=False)

File "C:\Users\Lab PC\Documents\PythonWorkspace\convnets-keras-master\convnetskeras\convnets.py", line 83, in convnet
convnet = convnet_init(weights_path, heatmap=False)

File "C:\Users\Lab PC\Documents\PythonWorkspace\convnets-keras-master\convnetskeras\convnets.py", line 248, in AlexNet
conv_2 = crosschannelnormalization(name='convpool_1')(conv_2)

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py", line 569, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)

File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py", line 632, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)

File "C:\ProgramData\Anaconda3\lib\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 "C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\core.py", line 596, in call
return self.function(x, **arguments)

File "C:\Users\Lab PC\Documents\PythonWorkspace\convnets-keras-master\convnetskeras\customlayers.py", line 24, in f
scale += alpha * extra_channels[:, i:i + ch, :, :]

File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 979, in binary_op_wrapper
return func(x, y, name=name)

File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 296, in add
"Add", x=x, y=y, name=name)

File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)

File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3392, in create_op
op_def=op_def)

File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1734, in init
control_input_ops)

File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1570, in _create_c_op
raise ValueError(str(e))

ValueError: Dimensions must be equal, but are 27 and 26 for 'add_2' (op: 'Add') with input shapes: [?,27,27,100], [?,26,27,100].

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