Hello PyTorch Community,
However, when I try to run the code with PyTorch 2.1.0, I encounter the following error:
AttributeError: 'GRU' object has no attribute '_flat_weights'. Did you mean: '_all_weights'?
This error appears during the loading of a pre-trained model using torch.load. Here’s the snippet of the code where the error occurs:
mymodel = torch.load('trained_model.torchsave', map_location=lambda storage, loc: storage)
From my understanding, this seems to relate to a change in the GRU module between versions. As I’m new to the field, I would greatly appreciate any guidance on how to address this issue to make the model compatible with the latest PyTorch version.
Thank you for your assistance.