MicrobeLab / DeepMicrobes

DeepMicrobes: taxonomic classification for metagenomics with deep learning
https://doi.org/10.1093/nargab/lqaa009
Apache License 2.0
81 stars 21 forks source link

model weights not saving? #18

Closed helloftroy closed 2 years ago

helloftroy commented 2 years ago

Hello!

I’m a student using DeepMicrobes, I’m trying to train the model on my own genome set. It seems that when I try to train DeepMicrobes, it will minimize loss/increase accuracy well, but then the model and weights are not saved at the end of the run. No file or weights are saved. Do you know why this is the case? How should DeepMicrobes.py save the weights after training?

The line I run is: ./DeepMicrobes/DeepMicrobes.py --input_tfrec ~/localscratch/MarRef.train.tfrec --model_name=attention --batch_size=4096 --model_dir=~/localscratch/no_parameter_setting1k

I've tried making a folder no_parameter_setting1k and not making one, but that is not the problem. Am I correct to believe the --model_dir should make brand new weights when I run this line?

Thanks for your help, Helen

helloftroy commented 2 years ago

Hello! I believe I fixed it. There should be no '=' when defining the inputs:

The line I run is: ./DeepMicrobes/DeepMicrobes.py --input_tfrec /localscratch/MarRef.train.tfrec --model_name attention --batch_size 4096 --model_dir /localscratch/no_parameter_setting1k

For some reason, with the '=' the out directory was not being read. Thanks!

MicrobeLab commented 2 years ago

Nice! Thanks!