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 #32

Open
conquistador3 opened this issue Feb 25, 2019 · 0 comments
Open

InvalidArgumentError #32

conquistador3 opened this issue Feb 25, 2019 · 0 comments

Comments

@conquistador3
Copy link

** init lr: 0.000200 decay_every_epoch: 100, lr_decay: 0.500000
Traceback (most recent call last):
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call
return fn(*args)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation gradients/AddN_55 of type _MklAddN must have the same size and shape. Input 0: [64,4,4,512] != input 1: [524288]
[[Node: gradients/AddN_55 = _MklAddN[N=2, T=DT_FLOAT, _kernel="MklOp", _device="/job:localhost/replica:0/task:0/device:CPU:0"](gradients/AddN_17, gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropInput, gradients/AddN_17:1, gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropInput:1, ^gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropFilter)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train_txt2im.py", line 451, in

File "train_txt2im.py", line 213, in main_train
t_wrong_caption : b_wrong_caption,
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 900, in run
run_metadata_ptr)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
run_metadata)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1335, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation gradients/AddN_55 of type _MklAddN must have the same size and shape. Input 0: [64,4,4,512] != input 1: [524288]
[[Node: gradients/AddN_55 = _MklAddN[N=2, T=DT_FLOAT, _kernel="MklOp", _device="/job:localhost/replica:0/task:0/device:CPU:0"](gradients/AddN_17, gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropInput, gradients/AddN_17:1, gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropInput:1, ^gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropFilter)]]

Caused by op 'gradients/AddN_55', defined at:
File "train_txt2im.py", line 451, in
File "train_txt2im.py", line 111, in main_train
with tf.variable_scope('learning_rate'):
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\training\optimizer.py", line 399, in minimize
grad_loss=grad_loss)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\training\optimizer.py", line 511, in compute_gradients
colocate_gradients_with_ops=colocate_gradients_with_ops)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 532, in gradients
gate_gradients, aggregation_method, stop_gradients)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 633, in _GradientsHelper
aggregation_method)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 1005, in _AggregatedGrads
out_grads[i] = _MultiDeviceAddN(out_grad, gradient_uid)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 891, in _MultiDeviceAddN
summands.append(math_ops.add_n(tensors))
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 2125, in add_n
return gen_math_ops.add_n(inputs, name=name)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 368, in add_n
"AddN", inputs=inputs, name=name)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
op_def=op_def)
File "C:\Users\RanjanNi\AppData\Local\Continuum\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Inputs to operation gradients/AddN_55 of type _MklAddN must have the same size and shape. Input 0: [64,4,4,512] != input 1: [524288]
[[Node: gradients/AddN_55 = _MklAddN[N=2, T=DT_FLOAT, _kernel="MklOp", _device="/job:localhost/replica:0/task:0/device:CPU:0"](gradients/AddN_17, gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropInput, gradients/AddN_17:1, gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropInput:1, ^gradients/discriminator_1/d_h4_res/conv2d/Conv2D_grad/Conv2DBackpropFilter)]]

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