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

ValueError: Dimension 3 in both shapes must be equal #33

Open
ghailey opened this issue May 29, 2019 · 1 comment
Open

ValueError: Dimension 3 in both shapes must be equal #33

ghailey opened this issue May 29, 2019 · 1 comment

Comments

@ghailey
Copy link

ghailey commented May 29, 2019

Traceback (most recent call last):
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1628, 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 12 and 3. Shapes are [?,8,8,12] and [?,8,8,3].
From merging shape 0 with other shapes. for 'generator/scale_1/calculation/concat/concat_dim' (op: 'Pack') with input shapes: [?,8,8,12], [?,8,8,3].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "avg_runner.py", line 187, in
main()
File "avg_runner.py", line 179, in main
runner = AVGRunner(num_steps, load_path, num_test_rec)
File "avg_runner.py", line 50, in init
c.SCALE_KERNEL_SIZES_G)
File "/home/guohaoyu/vedio_generation/Adversarial_Video_Generation/Code/g_model.py", line 48, in init
self.define_graph()
File "/home/guohaoyu/vedio_generation/Adversarial_Video_Generation/Code/g_model.py", line 159, in define_graph
last_scale_pred_train)
File "/home/guohaoyu/vedio_generation/Adversarial_Video_Generation/Code/g_model.py", line 123, in calculate
inputs = tf.concat(3, [inputs, last_gen_frames])
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1121, in concat
dtype=dtypes.int32).get_shape().assert_is_compatible_with(
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1050, in convert_to_tensor
as_ref=False)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1146, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 971, in _autopacking_conversion_function
return _autopacking_helper(v, dtype, name or "packed")
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 923, in _autopacking_helper
return gen_array_ops.pack(elems_as_tensors, name=scope)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 4875, in pack
"Pack", values=values, axis=axis, name=name)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3274, in create_op
op_def=op_def)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1792, in init
control_input_ops)
File "/home/guohaoyu/.conda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1631, in _create_c_op
raise ValueError(str(e))
ValueError: Dimension 3 in both shapes must be equal, but are 12 and 3. Shapes are [?,8,8,12] and [?,8,8,3].
From merging shape 0 with other shapes. for 'generator/scale_1/calculation/concat/concat_dim' (op: 'Pack') with input shapes: [?,8,8,12], [?,8,8,3].

@kittyvarghese
Copy link

@ghailey What is the cuda version you are using for running this code. I tried running in Cuda 9 , TF 1.12 and Ubuntu 16.04. It resulted in the same error which you have encountered. Kindly help us if you have solved this issue.

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