Open cculin18 opened 2 years ago
yes ,I have met that problem too .So do someone have fixed it?
Hi bro ,so have you fixed this problem ?
@cculin18 @JingdiZhou
Hi guys, I'm not sure whether you have solved this issue, but I encountered the same problem.
Upon checking, I found that the default value of the save_interval
parameter was set to None, and you can see this in the parse_arguments()
method, specifically line 29 in the train.py file.
At the same time, I noticed that @ParthPatel-ES fixed this issue in the Pull Request#14. He changed save_interval
from None to 2 and used math.fmod()
instead of %
in line 122. I saw an explanation of differences for these two methods in a Q&A on Kaggle: https://www.kaggle.com/questions-and-answers/102766. He also modified some paths for better execution on Google Colab, great job!
Additionally, I believe that adding a condition check before the code in line 122 or using a try-catch block to catch exceptions are both viable solutions.
Best regards.
@cculin18 @JingdiZhou
Hi guys, I'm not sure whether you have solved this issue, but I encountered the same problem. Upon checking, I found that the default value of the
save_interval
parameter was set to None, and you can see this in theparse_arguments()
method, specifically line 29 in the train.py file.At the same time, I noticed that @ParthPatel-ES fixed this issue in the Pull Request#14. He changed
save_interval
from None to 2 and usedmath.fmod()
instead of%
in line 122. I saw an explanation of differences for these two methods in a Q&A on Kaggle: https://www.kaggle.com/questions-and-answers/102766. He also modified some paths for better execution on Google Colab, great job!Additionally, I believe that adding a condition check before the code in line 122 or using a try-catch block to catch exceptions are both viable solutions.
Best regards.
I'm very appreciate your answer to me, which help me a lot in understanding the code
Hi, I got the problem, I can begin trainging the code. But while run epoch=2, it show this problem and stop to train.
File "train.py", line 212, in
trainer.train()
File "train.py", line 122, in train
if epoch % self.test_interval == 0 or epoch % self.save_interval == 0:
TypeError: unsupported operand type(s) for %: 'int' and 'NoneType'