Hi!
Bit confused about passing models, optimizers and schedulers to functions.
I have a function called train_epoch(model, optimizer, scheduler, …). Should the model in the calling function get updated by this function without me returning the model and reassigning it?
My (imperfect) understanding of python is that the function would create an instance of the objects and changes would only effect this scope (not the calling function). However my code currently does not return the model ect and training does appear to progress as expected.
Any insights much appreciated!