sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.42k stars 668 forks source link

what 's wrong with the shape problem?help #248

Open justlovefish opened 4 years ago

justlovefish commented 4 years ago

(py36) root@4f5f4031e3f6:~/EDSR-PyTorch/src# ./demo.sh Making model... Preparing loss function: 1.000 * L1 [Epoch 0] Learning rate: 1.00e-4

Evaluation: 0it [00:00, ?it/s] [DIV2K x2] PSNR: nan (Best: nan @epoch 1) Forward: 0.54s

Saving... Traceback (most recent call last): File "main.py", line 33, in main() File "main.py", line 28, in main t.test() File "/root/EDSR-PyTorch/src/trainer.py", line 123, in test self.ckp.save(self, epoch, is_best=(best[1][0, 0] + 1 == epoch)) File "/root/EDSR-PyTorch/src/utility.py", line 88, in save trainer.loss.plot_loss(self.dir, epoch) File "/root/EDSR-PyTorch/src/loss/init.py", line 111, in plot_loss plt.plot(axis, self.log[:, i].numpy(), label=label) File "/root/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3363, in plot ret = ax.plot(*args, kwargs) File "/root/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/init.py", line 1867, in inner return func(ax, *args, *kwargs) File "/root/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 1528, in plot for line in self._get_lines(args, kwargs): File "/root/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 406, in _grab_next_args for seg in self._plot_args(this, kwargs): File "/root/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 383, in _plot_args x, y = self._xy_from_xy(x, y) File "/root/miniconda3/envs/py36/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 242, in _xy_from_xy "have shapes {} and {}".format(x.shape, y.shape)) ValueError: x and y must have same first dimension, but have shapes (0,) and (1,)

Vahe987 commented 4 years ago

Hi, did you solve it ?

haikunzhang95 commented 1 year ago

@justlovefish Hi, did you solve the problem?