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

InvalidArgumentError: Incompatible shapes: [1,512,1024,3] vs. [1,512,1024,4,1] #12

Open
qiaoD opened this issue Sep 12, 2018 · 0 comments

Comments

@qiaoD
Copy link

qiaoD commented Sep 12, 2018

Traceback (most recent call last):
File "main.py", line 69, in
outputSavePath="../example/output")
File "/usr/qiaodong/dwt/E2E/forward.py", line 35, in forward_model
keepProb: 1.0})
File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 789, in run
run_metadata_ptr)
File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [1,512,1024,3] vs. [1,512,1024,4,1]
[[Node: model_builder/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_Placeholder_0_0, model_builder/ExpandDims)]]

Caused by op u'model_builder/mul', defined at:
File "main.py", line 69, in
outputSavePath="../example/output")
File "/usr/qiaodong/dwt/E2E/forward.py", line 19, in forward_model
model.build(tfBatchImages, tfBatchSS, tfBatchSSMask, keepProb=keepProb)
File "/usr/qiaodong/dwt/E2E/e2e_model.py", line 21, in build
inputData = inputData * ss
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 838, in binary_op_wrapper
return func(x, y, name=name)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 1061, in _mul_dispatch
return gen_math_ops._mul(x, y, name=name)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 1377, in _mul
result = _op_def_lib.apply_op("Mul", x=x, y=y, name=name)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1269, in init
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Incompatible shapes: [1,512,1024,3] vs. [1,512,1024,4,1]
[[Node: model_builder/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_Placeholder_0_0, model_builder/ExpandDims)]]

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