Saved fine-tuned model doesn't work after loading it
Hi, guys!I am fine-tuning a language model (“youscan/ukr-roberta-base”) and after fine-tuning it works properly and predicts perfectly. I save it with model.save(‘name’) to Google Colab and then move it to Google Drive. When I load it the next time withmodel = tf.keras.models.load_model(‘./drive/MyDrive/place’)and try to do the same .predict() as previously, I get error:“ValueError: Exception encountered when calling layer” tf_roberta_for_sequence_classification_2" (type TFRobertaForSequenceClassification).Could not find matching concrete function to call loaded from the SavedModel".What is wrong here?
2022-11-18T08:16:33Z
Hi,It’s recommended to usesave_pretrainedandfrom_pretrained
2022-11-18T18:57:59Z
Thank you!