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

Error when run main.py #304

Closed Lucas-Wye closed 3 years ago

Lucas-Wye commented 3 years ago

python3 main.py --model EDSR --scale 2 --patch_size 96 --save edsr_baseline_x2 --reset --ext sep

Saving...
Traceback (most recent call last):
  File "main.py", line 33, in <module>
    main()
  File "main.py", line 28, in main
    t.test()
  File "EDSR-PyTorch/src/trainer.py", line 123, in test
    self.ckp.save(self, epoch, is_best=(best[1][0, 0] + 1 == epoch))
  File "EDSR-PyTorch/src/utility.py", line 88, in save
    trainer.loss.plot_loss(self.dir, epoch)
  File "EDSR-PyTorch/src/loss/__init__.py", line 111, in plot_loss
    plt.plot(axis, self.log[:, i].numpy(), label=label)
  File "anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2789, in plot
    is not None else {}), **kwargs)
  File "anaconda3/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 1666, in plot
    lines = [*self._get_lines(*args, data=data, **kwargs)]
  File "anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 225, in __call__
    yield from self._plot_args(this, kwargs)
  File "anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 391, in _plot_args
    x, y = self._xy_from_xy(x, y)
  File "anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 270, 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,)