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: Assign requires shapes of both tensors to match. lhs shape= [4860259,100] rhs shape= [240,100] #42

Closed
nabarunaguha opened this issue Sep 26, 2019 · 0 comments

Comments

@nabarunaguha
Copy link

Hi,
I am using Tensorflow Version: 1.14.0
My input is 40 continuous columns with 6948 rows.

And the arguments to the TGANModel are something like this:

tgan = TGANModel(continuous_columns,
output='output',
gpu='/gpu:0',
max_epoch=5,
steps_per_epoch=1000,
save_checkpoints=False,
restore_session=True,
batch_size=50,
z_dim=50,
noise=0.2,
l2norm=0.00001,
learning_rate=0.001,
num_gen_rnn=100,
num_gen_feature=100,
num_dis_layers=1,
num_dis_hidden=100,
optimizer='AdamOptimizer')

### Now I am getting this error, any suggestion what may have gone wrong and what to be done to fix this?

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [4860259,100] rhs shape= [240,100]
[[{{node 140201455674712/Assign_28}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tensorflow/python/training/saver.py", line 1286, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 950, in run
run_metadata_ptr)
File "/home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1173, in _run
feed_dict_tensor, options, run_metadata)
File "/home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1350, in _do_run
run_metadata)
File "/home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1370, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [4860259,100] rhs shape= [240,100]
[[node 140201455674712/Assign_28 (defined at /home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tensorpack/tfutils/sessinit.py:111) ]]

Errors may have originated from an input operation.
Input Source operations connected to node 140201455674712/Assign_28:
discrim/dis_fc0/fc/W/Adam_1 (defined at /home/naguha/anaconda3/envs/tgantest/lib/python3.7/site-packages/tgan/trainer.py:56)

Thanks,
Nabaruna

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