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: Dimensions 1 and 512 are not compatible #1

Open
nixm123 opened this issue Jun 9, 2022 · 1 comment
Open

ValueError: Dimensions 1 and 512 are not compatible #1

nixm123 opened this issue Jun 9, 2022 · 1 comment

Comments

@nixm123
Copy link

nixm123 commented Jun 9, 2022

This is a great model, thanks for publishing it.
When I run the gan_language.py script with the example data, I got the following error:

Uppercase local vars:
BATCH_SIZE: 32
CRITIC_ITERS: 5
DATA_DIR: /public/home/nixm/run/Methods/8-DeepPromoter/Deep_promoter-master/seq
DIM: 512
ITERS: 200000
LAMBDA: 10
MAX_N_EXAMPLES: 14098
SEQ_LEN: 50
loading dataset...
loaded 14098 lines in dataset
Traceback (most recent call last):
File "gan_language.py", line 89, in
fake_inputs = Generator(BATCH_SIZE)
File "gan_language.py", line 65, in Generator
output = ResBlock('Generator.1', output)
File "gan_language.py", line 55, in ResBlock
output = lib.ops.conv1d.Conv1D(name+'.1', DIM, DIM, 5, output)
File "/public/home/nixm/run/Methods/8-DeepPromoter/Deep_promoter-master/tflib/ops/conv1d.py", line 93, in Conv1D
data_format='NCHW'
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1204, in conv1d
data_format=data_format)
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 394, in conv2d
data_format=data_format, name=name)
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 703, in apply_op
op_def=op_def)
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2319, in create_op
set_shapes_for_outputs(ret)
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1711, in set_shapes_for_outputs
shapes = shape_func(op)
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 230, in conv2d_shape
input_shape[3].assert_is_compatible_with(filter_shape[2])
File "/public/home/nixm/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 108, in assert_is_compatible_with
% (self, other))
ValueError: Dimensions 1 and 512 are not compatible

I am fairly new to tensorflow and I don't konw how to solved it. Any help would be appreciated. Thanks a lot!

@Iris7788
Copy link

Iris7788 commented Jun 9, 2022 via email

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