WIP: Generic trainer
- Adds a generic trainer class and trainer script
- Moved the model specific stuff to config files; example config added
- uses
.to(device)
throughout
Merge request reports
Activity
@heusch Can you take a look at the
GenericTrainer
class, many of the model specific stuff is moved to the config file. An example config file inconfig/generic/oulu_deep_pixbis.py
Feedbacks & improvements are welcome.That's a good start, thanks.
Two things I'm concerned about though, and were we should take special care in my opinion:
- Not sure that the load model function is generic enough (depending if the model was saved on CPU or GPU
- I'm also not fond of the dataset stuff as it is right now. Although the idea of linking that to bob's db interface is great, I'm not really satisified with its current implementation ...
I'll probably start working on that (I mean, the whole package refactoring) as soon as I'm done with moving MCAE stuff back to the paper package.
It may be a good thing to discuss on how we see this some time next week ! Anyway, thanks for setting things in motion ;)
Edited by Guillaume HEUSCH- Currently, it's moved to CPU while saving (same as the previous trainers), and when you load it back it's loaded to cpu, which is moved
.to(device)
while training. I haven't tested all the use cases though. - I think there should be an interface which can be usable with bobs db interfaces. I tried a generic loader which can accept a custom function to decide the format that we want to return from the dataset. I could use this stuff with 2-3 different architectures and with different databases just by changing the config file.
- Currently, it's moved to CPU while saving (same as the previous trainers), and when you load it back it's loaded to cpu, which is moved
- I remembered having trouble with provided pre-trained models, I'll check the different use-cases
- Sure the interface is needed, and I'm not saying that the current approach is not good (I did not take the time to check it lately though), but I think it could be improved (based on my memories).
mentioned in merge request !27 (merged)
Please register or sign in to reply