Hello,
when I run this code, there is a problem:
/home/yzl/anaconda2/lib/python2.7/site-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "/home/yzl/cltdevelop/OCR/Formula/im2latex-tensorflow-master/attention.py", line 42, in
logits = tflib.ops.Linear('MLP.1',out,DEC_DIM,V)
File "/home/yzl/cltdevelop/OCR/Formula/im2latex-tensorflow-master/tflib/ops.py", line 138, in Linear
reshaped_inputs = tf.reshape(inputs, [-1, input_dim])
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3938, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2958, in create_op
set_shapes_for_outputs(ret)
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2209, in set_shapes_for_outputs
shapes = shape_func(op)
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2159, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/home/yzl/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Dimension size must be evenly divisible by 512 but is 80320 for 'MLP.1/Reshape' (op: 'Reshape') with input shapes: [1,160,502], [2] and with input tensors computed as partial shapes: input[1] = [?,512].