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

AssertionError: X and Y should be the same shape #6

Open
ghost opened this issue Sep 24, 2019 · 3 comments
Open

AssertionError: X and Y should be the same shape #6

ghost opened this issue Sep 24, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 24, 2019

Hello while I was training the autoenconder I encoder this error message shown below:
Have you ever encountered this error while training?

. . . Epoch: [0][0/361] Batch Time: 0.202 (0.202) sec Loss: 0.05724537745118141 Traceback (most recent call last): File "main2.py", line 489, in <module> main() File "main2.py", line 294, in main valid_loss, _, _ = validation(test_loader,model,epoch,args,chamfer,vis_Valid,vis_Valida,valid_writer) File "main2.py", line 407, in validation vis_Valid.plot_current_errors(epoch, float(i) / epoch_size, args, errors) File "/home/paolo/Documents/Git/RL-GAN-Net/visualizer.py", line 79, in plot_current_errors win=self.display_id) File "/home/paolo/anaconda3/envs/rlgan-venv/lib/python3.7/site-packages/visdom/__init__.py", line 389, in wrapped_f return f(*args, **kwargs) File "/home/paolo/anaconda3/envs/rlgan-venv/lib/python3.7/site-packages/visdom/__init__.py", line 1694, in line assert X.shape == Y.shape, 'X and Y should be the same shape' AssertionError: X and Y should be the same shape

@inFocus7
Copy link

Hey! Did you manage to fix this issue?

@xcc13
Copy link

xcc13 commented Jun 15, 2020

Hey! Did you manage to fix this issue?

Hello~ Have you fixed it?

@huynhtnhut97
Copy link

huynhtnhut97 commented May 11, 2022

I managed to fix this error by following changes to the /anaconda3/envs/RL-GAN/lib/python3.6/site-packages/visdom/init.py :
`
if Y.ndim == 2 and Y.shape[1] == 1:

Y = Y.reshape(Y.shape[0]) # instead of Y = Y.reshape(1, Y.shape[0])

X = X.reshape(X.shape[0])
`
...

opts['markers'] = True if Y.ndim == 1 else opts.get('markers', False)

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

3 participants