Mentions légales du service

Skip to content

[#50] get rid of the device argument for LearnedParams

E. Madison Bray requested to merge embray/issue-50 into master

As pointed out by @pjobic it shouldn't be necessary just for instantiating this class. Instead, the losses/weights are copied to the appropriate device as a training preparation step. As a convenience, a LearnedParams.to method is added for this.

Is this closer to what you had in mind?

In fact, we could go further with this and make LearnedParams itself into a pytorch Module (or have a method on it that returns one). This could hide away some of the details in ModelTrainer._compute_loss_metrics to make it easier to customize. Might be useful for !57 but I'm not entirely sure.

Merge request reports