ohXu / MPR_GAN

3 stars 0 forks source link

ValueError: invalid literal for int() with base 10: '' #1

Open ShiruiTian opened 1 year ago

ShiruiTian commented 1 year ago

Dear authors.

thanks for your work,how to solve this problem: (gan) thinker@Linux:~/code/MPR_GAN$ python train.py

training images = 16

create web directory ./checkpoints/xxyL/web... (epoch: 1, iters: 0) G_GAN: 1.088 G_GAN_Feat: 9.651 G_SSIM: 9.991 D_real2: 1.093 D_fake2: 0.138 (epoch: 1, iters: 5) G_GAN: 1.066 G_GAN_Feat: 8.463 G_SSIM: 8.957 D_real2: 0.653 D_fake2: 0.731 End of epoch 1 / 200 Time Taken: 2 sec saving the model at the end of epoch 1 Traceback (most recent call last): File "train.py", line 101, in a = int(data['path1'][0].split('\.')[-1].split('.')[0]) ValueError: invalid literal for int() with base 10: ''

Could you be so kind as to let me know what happens?

Thanks.

ohXu commented 1 year ago

The purpose of this code is to extract the file name. In my opinion, the problem may be related to the operating system, e.g., windows or ubuntu. You can try to print the contents in the int() , or modify the code here depending on your situation.

ShiruiTian commented 1 year ago

I'll try again. Thank you very much for your reply

Yellowshuohahaha commented 1 year ago

Change 'a = int(data['path1'][0].split('\')[-1].split('.')[0])' to 'a = int(data['path1'][0].split('/')[-1].split('.')[0])' will be helpful in ubuntu.