I’m trying to load a saved model using learner_load() but get errors about missing dls.
It works just fine if I do learn.load(filepath) but I need to load the model from only the filepath.
Thanks, it works now. But I have a bonus question:
learn.export works just fine if I’m using the code from the tutorial. But if I change the loss function to labelsmoothning:
should I just set the loss_func to None before saving? Or shoud the LabelSmoothing function be re-written somehow? It might be good to know if I write more custom codes to my models.
Thanks for your explanation. But in this case, i think the docu and naming of the functions is very missleading… Also, why would it be possible to give an error when somebody is using it wrong?
load_learner requires all your custom code be in the exact same place as when exporting your Learner (the main script, or the module you imported it from).