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

the version #21

Open
Yang507 opened this issue Nov 17, 2016 · 4 comments
Open

the version #21

Yang507 opened this issue Nov 17, 2016 · 4 comments

Comments

@Yang507
Copy link

Yang507 commented Nov 17, 2016

I use the keras version 1.1.1 and tensorflow 0.10 is not fit to your new updated program, there is a problem:raise TypeError("List of Tensors when single Tensor expected") TypeError: List of Tensors when single Tensor expected.

@da03
Copy link
Owner

da03 commented Nov 17, 2016

Thanks for the feedback! Do you have a detailed error message? And actually I was testing on the latest tensorflow (0.11).

@Yang507
Copy link
Author

Yang507 commented Nov 17, 2016

the detail error:

Traceback (most recent call last):
 File "src/launcher.py", line 136, in <module>
  main(sys.argv[1:], exp_config.ExpConfig)
 File "src/launcher.py", line 132, in main
  session = sess)
 File "/home/yanghang/Attention-OCR/src/model/model.py", line 167, in __init__
  self.keras_updates.append(tf.assign(old_value, new_value))
  File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python       /ops/gen_state_ops.py", line 45, in assign
use_locking=use_locking, name=name)
 File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 454, in apply_op
as_ref=input_arg.is_ref)
 File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 621, in convert_to_tensor
  ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
 File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 180, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 163, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape))
File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 353, in make_tensor_proto
_AssertCompatible(values, dtype)
File "~/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 287, in _AssertCompatible
raise TypeError("List of Tensors when single Tensor expected")
TypeError: List of Tensors when single Tensor expected.

I hope this can help you!

@Yang507
Copy link
Author

Yang507 commented Nov 17, 2016

I doubt whether is tensorflow's version problem, i don't want to upgrade tensorflow version to 11 now.

@Yang507
Copy link
Author

Yang507 commented Nov 18, 2016

I used the keras version 1.0.4 and tensorflow 0.10, I run the old code(before you updated the code) and restart to train my data , but encountered a problem:
Traceback (most recent call last): File "src/launcher.py", line 129, in <module> main(sys.argv[1:], exp_config.ExpConfig) File "src/launcher.py", line 126, in main model.launch() File "~/anaconda2/Attention-OCR-master/src/model/model.py", line 279, in launch _, step_loss, step_logits, _ = self.step(encoder_masks, img_data, zero_paddings, decoder_inputs, target_weights, bucket_id, self.forward_only) UnboundLocalError: local variable 'img_data' referenced before assignment

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

2 participants