albert_pytorch icon indicating copy to clipboard operation
albert_pytorch copied to clipboard

AttributeError: 'AlbertForSequenceClassification' object has no attribute 'keys'

Open chiragsanghvi10 opened this issue 5 years ago • 0 comments

Hello, I am trying to predict sentence similarity, I have trained using STS-B data set.

modeling_utils.py

I changed the code from torch.save(model_to_save.state_dict(), output_model_file) to torch.save(model_to_save, output_model_file) because I'm looking for the complete checkpoint file.

Error message:

I get the following error message AttributeError: 'AlbertForSequenceClassification' object has no attribute 'keys'

I am trying to predict the semantic sentence similarity.

Any updates on this? Thanks in advance.

chiragsanghvi10 avatar Dec 05 '19 15:12 chiragsanghvi10