pytorch-noise2void icon indicating copy to clipboard operation
pytorch-noise2void copied to clipboard

Error running train.py

Open ginacode opened this issue 5 years ago • 1 comments

I run into an error loading my data. What could this be caused by? My dataset is BSDS500, downloaded directly from the website: https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/resources.html

-bash-4.2$ python main.py --mode train \
>                --scope resnet \
>                --name_data /scratch1/pytorch-noise2void/data/BSR/BSDS500/data/images \
>                --dir_data ./data \
>                --dir_log ./logs \
>                --dir_checkpoint ./checkpoints \
>                --gpu_ids '0, 1'
----------------------------------------
            PARAMETER TABLES
----------------------------------------
batch_size :                         1
beta1 :                            0.5
data_type :                    float32
dir_checkpoint :         ./checkpoints
dir_data :                      ./data
dir_log :                       ./logs
dir_result : ./drive/My Drive/GitHub/pytorch-noise2void/results
gpu_ids :                       [0, 1]
lr_G :                           0.001
mode :                           train
name_data : /scratch1/pytorch-noise2void/data/BSR/BSDS500/data/images
nch_in :                             3
nch_ker :                           64
nch_load :                           3
nch_out :                            3
norm :                           bnorm
num_epoch :                        300
num_freq_disp :                     10
num_freq_save :                     50
nx_in :                            481
nx_load :                          256
nx_out :                           256
ny_in :                            321
ny_load :                          256
ny_out :                           256
optim :                           adam
scope :                         resnet
train_continue :                    on
----------------------------------------
initialize network with normal
Traceback (most recent call last):
  File "main.py", line 84, in <module>
    main()
  File "main.py", line 79, in main
    TRAINER.train()
  File "/scratch1/pytorch-noise2void/train.py", line 181, in train
    netG, optimG, st_epoch = self.load(dir_chck, netG, optimG, mode=mode)
  File "/scratch1/pytorch-noise2void/train.py", line 82, in load
    epoch = int(ckpt[-1].split('epoch')[1].split('.pth')[0])
IndexError: list index out of range

ginacode avatar Mar 19 '20 21:03 ginacode

Thank you for your comment.

I fixed this error.

This error was occurred due to empty list of check points.

hanyoseob avatar Mar 20 '20 05:03 hanyoseob