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 during test #26

Open
michelecafagna26 opened this issue Jun 13, 2019 · 0 comments
Open

InvalidArgumentError during test #26

michelecafagna26 opened this issue Jun 13, 2019 · 0 comments

Comments

@michelecafagna26
Copy link

michelecafagna26 commented Jun 13, 2019

full stack trace:

Caused by op u'save/Assign_42', defined at:
File "style_transfer.py", line 232, in
model = create_model(sess, args, vocab)
File "style_transfer.py", line 196, in create_model
model = Model(args, vocab)
File "style_transfer.py", line 159, in init
self.saver = tf.train.Saver()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1140, in init
self.build()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1172, in build
filename=self._filename)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 688, in build
restore_sequentially, reshape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 419, in _AddRestoreOps
assign_ops.append(saveable.restore(tensors, shapes))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 155, in restore
self.op.get_shape().is_fully_defined())
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/state_ops.py", line 274, in assign
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 43, in assign
use_locking=use_locking, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1204, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [128] rhs shape= [32]
[[Node: save/Assign_42 = Assign[T=DT_FLOAT, _class=["loc:@discriminator1/conv-maxpool-1/b"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](discriminator1/conv-maxpool-1/b/Adam, save/RestoreV2_42/_43)]]

Using:
-nvidia-docker , with official docker image tensorflow/tensorflow:1.3.0-gpu
-python 2.7.12
-tensorflow 1.3.0

with this training configuration

{ 'batch_size': 8,
'beam': 1,
'dev': '../data/datadev',
'dim_emb': 100,
'dim_y': 100,
'dim_z': 100,
'dropout_keep_prob': 0.5,
'embedding': '',
'filter_sizes': '1,2,3,4,5',
'gamma_decay': 1,
'gamma_init': 0.1,
'gamma_min': 0.1,
'learning_rate': 0.0005,
'load_model': False,
'max_epochs': 20,
'max_seq_length': 20,
'max_train_size': -1,
'model': '../model/model',
'n_filters': 32,
'n_layers': 1,
'online_testing': False,
'output': '../out/data.dev',
'rho': 1,
'steps_per_checkpoint': 1000,
'test': '',
'train': '../data/data.train',
'vocab': '../out/data.vocab'}

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