Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running train.py #1

Open
ginacode opened this issue Mar 19, 2020 · 1 comment
Open

Error running train.py #1

ginacode opened this issue Mar 19, 2020 · 1 comment

Comments

@ginacode
Copy link

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

@hanyoseob
Copy link
Owner

Thank you for your comment.

I fixed this error.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants