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

I can not train #11

Closed
sounansu opened this issue Aug 5, 2019 · 3 comments
Closed

I can not train #11

sounansu opened this issue Aug 5, 2019 · 3 comments

Comments

@sounansu
Copy link

sounansu commented Aug 5, 2019

I change main.py
net = dfanet(pretrained=True,num_classes=20)
to
net = dfanet(pretrained=False,num_classes=20)
and run.

(DFANet) sounnansu@ubuntu2:~/anaconda3/DFANet$ python main.py
./log/dfanet20190805T1416
Traceback (most recent call last):
  File "main.py", line 44, in <module>
    trainer.load_weights(trainer.find_last())
  File "/home/sounansu/anaconda3/DFANet/train.py", line 185, in find_last
    "Could not find weight files in {}".format(dir_name))
FileNotFoundError: [Errno 2] Could not find weight files in  ./log/dfanet20190805T1416
@huaifeng1993
Copy link
Owner

If you train the model form 0 epoch you should delete the code --trainer.load_weights(trainer.find_last())

@sounansu
Copy link
Author

sounansu commented Aug 20, 2019

Thank you!
I comment out 'trainer.load_weights(trainer.find_last())'.

There are no errors!

I changed some operation at
Dataset and pretrained model .

Then run the command 'python utils/preprocess.py' to create labels.

I used preprocess_data.py instead of preprocess.py.

Is is correct?

@huaifeng1993
Copy link
Owner

Thank you for pointing out the mistake.!!

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