Skip to content

ValueError: Dimensions 1 and 512 are not compatible #1

@nixm123

Description

@nixm123

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions