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

Some problems in running attention.py #5

Closed
ghost opened this issue Feb 24, 2017 · 1 comment
Closed

Some problems in running attention.py #5

ghost opened this issue Feb 24, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 24, 2017

Hi, I cloned your project and try to use it. Your code is fabulous.
However when I run python attention.py
there's always an error appear:

Caused by op 'pool1', defined at:
File ".\attention.py", line 37, in
ctx = tflib.network.im2latex_cnn(X,NUM_FEATS_START,True)
File "D:\THU\challengeCup\im2latex-tensorflow-master\tflib\network.py", line 77, in im2latex_cnn
X = tflib.ops.max_pool('pool1', X, k=2, s=2)
File "D:\THU\challengeCup\im2latex-tensorflow-master\tflib\ops.py", line 239, in max_pool
padding='SAME', name=name, data_format='NCHW')
File "C:\Users\Ellen\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1617, in max_pool
name=name)
File "C:\Users\Ellen\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1598, in _max_pool
data_format=data_format, name=name)
File "C:\Users\Ellen\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 759, in apply_op
op_def=op_def)
File "C:\Users\Ellen\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "C:\Users\Ellen\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1128, in init
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Default MaxPoolingOp only supports NHWC.
[[Node: pool1 = MaxPoolT=DT_FLOAT, data_format="NCHW", ksize=[1, 1, 2, 2], padding="SAME", strides=[1, 1, 2, 2
], _device="/job:localhost/replica:0/task:0/cpu:0"
]]

Does this mean I'm not preprocess the data properly? Or is there any possible reasons for this? How can I correct it?

@ritheshkumar95
Copy link
Owner

ritheshkumar95 commented Feb 24, 2017 via email

@ghost ghost closed this as completed Feb 26, 2017
This issue was closed.
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