Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5532 Discussions

Not able to provide --tensorboard_logs while converting a custom TensorFlow model

SPaul19
Innovator
232 Views

Hi. 

I am trying to convert a custom EfficientNetB0 model. I have been successful in doing so. But I am unable to obtain the `tensorboard_logs` argument. 

Here's the command I used for conversion - 

```

source /opt/intel/openvino/bin/setupvars.sh && \
python /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--saved_model_dir /content/products_10k_v2 \
--input_shape [1,224,224,3] \
--reverse_input_channels \
--output_dir /content/products_10k_ov \
--data_type FP16
```
 
`products_10k_v2` SavedModel is available here
0 Kudos
4 Replies
IntelSupport
Community Manager
215 Views

Hi SPaul19,

Thanks for reaching out.

From the information given, you are not giving the flag for the TensorBoard during the model optimization.

Could you share more information about your environment details (versions of OpenVINO, OS, TensorFlow, Python, CMake, etc.)?

 

However, please try the following workaround. Firstly, create a directory named TensorBoard in any directory. I put it in the Model Optimizer directory. Then, you have to run the import_pb_to_tensorboard.py. Go to <USERS_DIR>\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\tools and execute this command "python import_pb_to_tensorboard.py --log_dir "<INSTALL)DIR>\openvino_2021.2.185\deployment_tools\model_optimizer\TensorBoard" --model_dir "<USERS_DIR>Downloads\products_10k_v2.tar\products_10k_v2" and you will see the model is imported. Check your TensorBoard folder and you will see the file creation.

 

Next, go to the Model Optimizer directory and execute the model optimization by running this command.

python mo_tf.py --saved_model_dir "<USER_DIR>\Downloads\products_10k_v2.tar\products_10k_v2" -b 1 --tensorboard_logdir "<INSTALL_DIR>\openvino_2021.2.185\deployment_tools\model_optimizer\TensorBoard"

 

For more information, refer to the following documentation.

https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_convert_model_Convert_Mode...

 

Here is a video on how to get the TensorBoard log step by step.

Model Optimizer - TensorFlow | OpenVINO™ toolkit | Ep. 12 | Intel Software

 

Regards,

Aznie


SPaul19
Innovator
211 Views

I tried specifying the tensorboard_logs during model conversion as I already mentioned. 

My OpenVINO version is 2020.4. TensorFlow version is 2.4.0 and Python 3.7. I am on Colab. 

IntelSupport
Community Manager
162 Views

Hi SPaul19,

 

We have tested your model on our machine and we able to get the tensorboard logs using the same system environment with you. Please try to run the same command as below and if you face any error, feel free to share the error message.

 

sudo python3 mo.py --saved_model_dir ~/Desktop/products_10k_v2/ --input_shape [1,224,224,3] --reverse_input_channels --output_dir .. --tensorboard_logdir logs/

 

Regards,

Aznie


IntelSupport
Community Manager
146 Views

Hi SPaul19,

This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Regards,

Aznie


Reply