Low-rank-Multimodal-Fusion
Low-rank-Multimodal-Fusion copied to clipboard
i can't save model on colab
I tried to save this model on colab. model_save_name = 'classifier.pt' path = F"/content/gdrive/My Drive/{model_save_name}" torch.save(LMF.state_dict(), path)
but found error
TypeError Traceback (most recent call last)
TypeError: state_dict() missing 1 required positional argument: 'self'
Hi, from the code you showed it seems you are calling .state_dict
method on the LMF class itself, rather than on a concrete instance of LMF class. You can refer to this PyTorch documentation on how to properly save checkpoints.