Thank you, the problem is that the intialization step is
self.optimizer = O.optimizer(self.model.parameters(), lr, momentum, optimizer_name)
that i have before the training loop. If I use data_phrases and data_words before they are being defined, there might be an error.
Cant I do something like “self.optimizer.add_param_group({“params”: [data_phrases, data_words]})” in the training phase? I tried that but still not working!
Any advise?
Thanks a lot