After your comment I tried to replicate the earlier error on another computer, and I could not. The additional fine-tuning of custom BertForSequenceClassification model saved earlier was done without any error. So you were right. Thank you.