tamarott / SinGAN

Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"
https://tamarott.github.io/SinGAN.htm
Other
3.29k stars 608 forks source link

FileNotFoundError #142

Closed shamuiscoding closed 3 years ago

shamuiscoding commented 3 years ago

Firstly, thank you for the upload of your code. It's a very interesting piece of research. I'm trying to use SinGAN for the SR task. As far as I understood, python SR.py ~~ is the code for training on the SR task (according to the description below) image

However, I'm encountering this error.

image

According to #114 (the only issue with the same problem as mine), it is a version issue. But, in my case, I'm using Python 3.6.13, Torch 1.4.0, and Torchvision 0.5.0 which are supposedly the correct version according to issue 114.
image

Any ideas on how to fix this problem? Thanks in advance.

shamuiscoding commented 3 years ago

I think I'm supposed to train on main_train.py first then move onto SR.py. Will close if this works

shamuiscoding commented 3 years ago

It is confirmed that issue 114's solution is indeed correct. The reason that I was experiencing the problem was because I ran the code on input image with torch 1.8.0 and torchvision 0.7.0. Even though I reinstalled the libraries with the correct version it had already jammed. When I tried training with SR.py on another image (with the correct versions installed) it worked like a charm.