Hi everyone!
I recently tried to use a public repo that you can find here:
USAD
I have an issue when using the training
function. I first create my own train and val loaders that I give as arguments:
training(epochs, model, train_loader, val_loader, opt_func=torch.optim.Adam)
It raises an error TypeError: 'DataLoader' object is not callable
.
The thing is that this error is supposed to be raised by the line:
optimizer1 = opt_func(list(model.encoder.parameters()) + list(model.decoder1.parameters()))
Even weirder, when I try to call these lines in a notebook (not with the training
function), this error won’t occur.
Does anyone have an idea about what could be happening when calling the function?
Thanks a lot for your help!