Firstly I tried converting my fine-tuned MobileBERT model, but was got the below error
**Validating Core ML model...
Core ML model is classifier, validating output
-[x] predicted class 'LABEL_0' doesn't match 'LABEL_3'
ValueError: Predicted class doesn't match between reference model and Core ML exported model: Got LABEL_3 (reference) and LABEL_0 (Core ML)**
The code used
python -m exporters.coreml --model="./Trained Models/Mobile-BERT/fine_tuned_mobileBERT" --feature="text-classification" output_model.mlpackage
When trying to convert the Google's mobileBERT got the below error
**
Validating Core ML model...
-[✓] Core ML model output names match reference model ({'last_hidden_state', 'pooler_output'})
Validating Core ML model output "last_hidden_state":
-[✓] (1, 128, 512) matches (1, 128, 512)
-[x] values not close enough (atol: 0.0001)
ValueError: Output values do not match between reference model and Core ML exported model: Got max absolute difference of: nan**
Code as below
python -m exporters.coreml --model=google/mobilebert-uncased exported/
**Validating Core ML model...
The code used
python -m exporters.coreml --model="./Trained Models/Mobile-BERT/fine_tuned_mobileBERT" --feature="text-classification" output_model.mlpackage
** Validating Core ML model... -[✓] Core ML model output names match reference model ({'last_hidden_state', 'pooler_output'})
ValueError: Output values do not match between reference model and Core ML exported model: Got max absolute difference of: nan**
Code as below
python -m exporters.coreml --model=google/mobilebert-uncased exported/
Below is the code
python -m exporters.coreml --model="./Trained Models/Mobile-BERT/fine_tuned_mobileBERT" --feature="text-classification" --quantize float32 output_model_quantized.mlpackage
Can you please help me on how to solve this problem.