Open tjnkyqcy opened 1 year ago
Have you solved this question?
@nuonuoxiangyaofeigaogao @tjnkyqcy In https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/issues/233#issuecomment-379134078 it is mentioned that you need to manually change the name of the .pth file.
All errors are reported as follows: Traceback (most recent call last): File "C:/Users/Administrator/Desktop/pytorch-CycleGAN-and-pix2pix-master/test.py", line 52, in
model.setup(opt) # regular setup: load and print networks; create schedulers
File "C:\Users\Administrator\Desktop\pytorch-CycleGAN-and-pix2pix-master\models\base_model.py", line 88, in setup
self.load_networks(load_suffix)
File "C:\Users\Administrator\Desktop\pytorch-CycleGAN-and-pix2pix-master\models\base_model.py", line 192, in load_networks
state_dict = torch.load(load_path, map_location=str(self.device))
File "E:\Anaconda3\envs\pytorch-gpu-Gan\lib\site-packages\torch\serialization.py", line 594, in load
with _open_file_like(f, 'rb') as opened_file:
File "E:\Anaconda3\envs\pytorch-gpu-Gan\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "E:\Anaconda3\envs\pytorch-gpu-Gan\lib\site-packages\torch\serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: './checkpoints\maps_cyclegan\latest_net_G.pth'
Here is the folder where I generated the model C:\Users\Administrator\Desktop\pytorch-CycleGAN-and-pix2pix-master\checkpoints\maps_cyclegan: -latest_net_D_A.pth -latest_net_D_B.pth -latest_net_G_A.pth -latest_net_G_B.pth There is no latest_net_G.pth in the program-generated model?