iSarmad / RL-GAN-Net

Official Repository of CVPR 2019 Paper : RL-GAN-Net: A Reinforcement Learning Agent Controlled GAN Network for Real-Time Point Cloud Shape Completion
MIT License
121 stars 42 forks source link

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

Open ghost opened 5 years ago

ghost commented 5 years ago

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 commented 4 years ago

Hey! Did you manage to fix this issue?

xcc13 commented 4 years ago

Hey! Did you manage to fix this issue?

Hello~ Have you fixed it?

huynhtnhut97 commented 2 years ago

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)