im2latex-tensorflow icon indicating copy to clipboard operation
im2latex-tensorflow copied to clipboard

run python attention.py ,error is following. how to fix it ? thanks in advance!

Open aspnetcs opened this issue 6 years ago • 12 comments

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. Traceback (most recent call last): File "attention.py", line 37, in out,state = tflib.ops.FreeRunIm2LatexAttention('AttLSTM',emb_seqs,ctx,EMB_DIM,ENC_DIM,DEC_DIM,D,H,W) File "/home/rootx/me/im2latextensorflow/im2latex-tensorflow-master/tflib/ops.py", line 625, in FreeRunIm2LatexAttention V = tf.transpose(ctx,[0,2,3,1]) # (B, H, W, D) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1420, in transpose ret = transpose_fn(a, perm, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 8927, in transpose "Transpose", x=x, perm=perm, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 488, in new_func return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 3274, in create_op op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1792, in init control_input_ops) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1631, in _create_c_op raise ValueError(str(e)) ValueError: Dimension must be 3 but is 4 for 'transpose' (op: 'Transpose') with input shapes: [?,?,80], [4].

aspnetcs avatar Dec 10 '18 07:12 aspnetcs

try to change paramter for FreeRunIm2LatexAttention i think this is a the paramter is mismatch to the function

qianwangn avatar Mar 07 '19 12:03 qianwangn

Any idea for this issue? I tried changing the parameters in a couple of ways but I got some other errors

behzad-ost avatar Jul 01 '19 20:07 behzad-ost

latest-gpu-py3-im2latex-gpu-allinone-v1.0 my docker
use it for free

--

At 2019-07-02 04:13:54, "Behzad Ousat" [email protected] wrote:

Any idea for this issue? I tried changing the parameters but I got some other errors:

Traceback (most recent call last): File "attention.py", line 37, in out,state = tflib.ops.FreeRunIm2LatexAttention('AttLSTM',ctx,emb_seqs,EMB_DIM,ENC_DIM,DEC_DIM,D,H,W) File "/home/behzad/deepProject/others/im2latex-tensorflow/tflib/ops.py", line 660, in FreeRunIm2LatexAttention out = tf.nn.dynamic_rnn(cell, inputs, initial_state=h0_dec, sequence_length=seq_len, swap_memory=True) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 324, in new_func return func(*args, **kwargs) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 707, in dynamic_rnn dtype=dtype) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 916, in _dynamic_rnn_loop swap_memory=swap_memory) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3501, in while_loop return_same_structure) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3012, in BuildLoop pred, body, original_loop_vars, loop_vars, shape_invariants) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2937, in _BuildLoop body_result = body(*packed_vars_for_body) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3456, in body = lambda i, lv: (i + 1, orig_body(*lv)) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 882, in _time_step skip_conditionals=True) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 283, in _rnn_step new_output, new_state = call_cell() File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 870, in call_cell = lambda: cell(input_t, state) File "/home/behzad/deepProject/others/im2latex-tensorflow/tflib/ops.py", line 558, in call _input = tflib.ops.Embedding('Embedding',self._n_out,self._n_in,_input) File "/home/behzad/deepProject/others/im2latex-tensorflow/tflib/ops.py", line 82, in Embedding initializer('Normal',[n_symbols, output_dim],std=1.0/np.sqrt(n_symbols)) File "/home/behzad/deepProject/others/im2latex-tensorflow/tflib/ops.py", line 46, in initializer return lasagne.init.Normal(std,mean).sample(shape) File "/home/behzad/miniconda3/envs/deepLearning/lib/python2.7/site-packages/lasagne/init.py", line 65, in sample return floatX(get_rng().normal(self.mean, self.std, size=shape)) File "mtrand.pyx", line 1657, in mtrand.RandomState.normal File "mtrand.pyx", line 242, in mtrand.cont2_array_sc TypeError: 'Tensor' object cannot be interpreted as an index

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 02 '19 23:07 aspnetcs

Where can I find this? I cannot find this image on dockerhub, actually nothing with the name 'im2latex'. I would appreciate it if you could give a repo link or some other url.

behzad-ost avatar Jul 03 '19 05:07 behzad-ost

docker run --runtime=nvidia --rm -it aspnetcs88/dlp:latest-gpu-py3-im2latex-gpu-one sh im2latex.sh

--

At 2019-07-03 13:56:20, "Behzad Ousat" [email protected] wrote:

Where can I find this? I cannot find this image on dockerhub, actually nothing with the name 'im2latex'. I would appreciate it if you could give a repo link or some other url.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 03 '19 06:07 aspnetcs

https://hub.docker.com/r/aspnetcs88/dlp/tags

--

At 2019-07-03 13:56:20, "Behzad Ousat" [email protected] wrote:

Where can I find this? I cannot find this image on dockerhub, actually nothing with the name 'im2latex'. I would appreciate it if you could give a repo link or some other url.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 03 '19 06:07 aspnetcs

Which university are you at? Can I go to you as a visiting scholar?

--

At 2019-07-03 13:56:20, "Behzad Ousat" [email protected] wrote:

Where can I find this? I cannot find this image on dockerhub, actually nothing with the name 'im2latex'. I would appreciate it if you could give a repo link or some other url.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 03 '19 06:07 aspnetcs

Thanks for the image. I will try it ASAP. Sharif University of Technology, I don't know actually. Contact these guys: http://ia.sharif.ir/

behzad-ost avatar Jul 03 '19 06:07 behzad-ost

Do you have QQ account or wechat account?

--

At 2019-07-03 14:34:30, "Behzad Ousat" [email protected] wrote:

Thanks for the image. I will try it ASAP. Sharif University of Technology, I don't know actually. Contact these guys: http://ia.sharif.ir/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 03 '19 07:07 aspnetcs

Do you have a chat tool?

--

At 2019-07-03 14:34:30, "Behzad Ousat" [email protected] wrote:

Thanks for the image. I will try it ASAP. Sharif University of Technology, I don't know actually. Contact these guys: http://ia.sharif.ir/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 03 '19 07:07 aspnetcs

Would you like to give me the files in the following link, https://buffalo.app.box.com/s/6gklgrotfd5drbxvdw2xtrt9i2ldmt01/file/311777457525

I can not download it thank you in advance! can you download the file in the following link? https://buffalo.app.box.com/s/6gklgrotfd5drbxvdw2xtrt9i2ldmt01/file/311777457525

--

At 2019-07-03 13:56:20, "Behzad Ousat" [email protected] wrote:

Where can I find this? I cannot find this image on dockerhub, actually nothing with the name 'im2latex'. I would appreciate it if you could give a repo link or some other url.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 28 '19 09:07 aspnetcs

Would you like to give me the files in the following link, https://buffalo.app.box.com/s/6gklgrotfd5drbxvdw2xtrt9i2ldmt01/file/311777457525

I can not download it thank you in advance! can you download the file in the following link? https://buffalo.app.box.com/s/6gklgrotfd5drbxvdw2xtrt9i2ldmt01/file/311777457525

--

At 2019-07-03 14:34:30, "Behzad Ousat" [email protected] wrote:

Thanks for the image. I will try it ASAP. Sharif University of Technology, I don't know actually. Contact these guys: http://ia.sharif.ir/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

aspnetcs avatar Jul 28 '19 09:07 aspnetcs