Open AnwarUllahKhan opened 6 years ago
@neilsh @paarthneekhara @gitter-badger @AbhishekNarayanan, sir please see the above error and inform me what's wrong with this....
Thanks
for the line z_concat = tf.concat(1, [t_z, reduced_text_embedding]) use this instead z_concat = tf.concat([t_z, reduced_text_embedding],1)
when use the above "code" for correcting this error occured..what will do
WARNING:tensorflow:From /home/hp/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. Traceback (most recent call last): File "/home/hp/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1659, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimension 3 in both shapes must be equal, but are 512 and 256. Shapes are [64,4,4,512] and [64,4,4,256]. From merging shape 0 with other shapes. for 'h3_concat/concat_dim' (op: 'Pack') with input shapes: [64,4,4,512], [64,4,4,256].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 238, in
Please write all tf.concat as follows:
z_concat = tf.concat(axis=1, values=[t_z, reduced_text_embedding]) instead of z_concat = tf.concat(1, t_z, reduced_text_embedding)
The parameter placement has changed hence specifying the parameters will help. @remyavijeesh22 @AnwarUllahKhan
Traceback (most recent call last): File "train.py", line 241, in
main()
File "train.py", line 79, in main
input_tensors, variables, loss, outputs, checks = gan.build_model()
File "C:\Users\anwar\Downloads\Documents\text-to-image-master\model.py", line 37, in build_model
fake_image = self.generator(t_z, t_real_caption)
File "C:\Users\anwar\Downloads\Documents\text-to-image-master\model.py", line 137, in generator
z_concat = tf.concat(1, [t_z, reduced_text_embedding])
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1121, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1048, in convert_to_tensor
as_ref=False)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1144, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 971, in _autopacking_conversion_function
return _autopacking_helper(v, dtype, name or "packed")
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 923, in _autopacking_helper
return gen_array_ops.pack(elems_as_tensors, name=scope)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 5644, in pack
"Pack", values=values, axis=axis, name=name)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3272, in create_op
op_def=op_def)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1790, in init
control_input_ops)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1629, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension 1 in both shapes must be equal, but are 100 and 256. Shapes are [64,100] and [64,256].
From merging shape 0 with other shapes. for 'concat/concat_dim' (op: 'Pack') with input shapes: [64,100], [64,256].