- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using a custom trained model which was transfer learned on efficienetB0 ,I could convert it to fp32 and int8 versions, But when i use accuracy checker on it it was throwing the following message
04:20:25 accuracy_checker ERROR: Cannot handle this data type: (1, 1, 3), <f4
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/Pillow-8.4.0-py3.8-linux-x86_64.egg/PIL/Image.py", line 2835, in fromarray
mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 3), '<f4')
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
the EfficientnetB0 model pre-trained in TensorFlow is supported by OpenVINO.
You may refer here for more details.
Make sure you fed the correct input shape during the execution of Model Optimizer using the parameter --input_shape. (eg: [1,3,227,227] or (1,227,227,3) ).
The order of dimensions depends on the framework input layout of the model. For example, [N,C,H,W] is used for Caffe* models and [N,H,W,C] for TensorFlow* models.
Another thing to take note of is your model's channel order (BGR or RGB). You need to use the --reverse_input_channels if any change is required.
To understand better, you may refer :
You should be able to test inferencing with your model using the OpenVINO Benchmark App.
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Iffa_Intel Thanks for replying , I tried both your methods , i.e tried giving input shapes and added reverse input channel , but unfortunately I am still facing the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If possible, could you share your model files?.
Plus with your commands that you used with the Model Optimizer and accuracy checker.
Did you implement any custom layer to the model?
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The commands I used are
For model optimizer:
python3 /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo.py --input_model trained_model.onnx --output_dir ./ --input_shape [1,224,224,3] --reverse_input_channels
For accuracy checker :
accuracy_check -c /home/ubuntu/model.yaml -m /home/ubuntu/trained_model.xml -s /home/ubuntu/test_dataset -a /home/ubuntu/test_dataset/ --intermediate_metrics_results=True --metrics_interval=100 -td CPU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ashwin_J_S , I need both xml and bin file in order to try inferencing your model. Please help to share the bin file also.
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Thank you for your question. If you need any additional information from Intel, please submit a new question as Intel is no longer monitoring this thread
Sincerely,
Iffa

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page