NPU: convert module failed. ( No module named 'tfruler')

1, below ‘aml_npu_sdk_6.4.2.1/acuity-toolkit’

2, heaven7@heaven7-os:/media/heaven7/C14D581BDA18EBFA/aml_npu_sdk_6.4.2.1/acuity-toolkit$ bin/acuitylib/convertensorflow --tf-pb graph_opt.pb \

–inputs image --outputs Openpose/MConv_Stage6_L1_5_pointwise/BatchNorm/FusedBatchNorm,Openpose/MConv_Stage6_L2_5_pointwise/BatchNorm/FusedBatchNorm
–net-output mobilenet_thin.json --data-output mobilenet_thin.data
–input-size-list ‘432,368,3’

//log
I Start importing tensorflow…
Traceback (most recent call last):
File “convertensorflow.py”, line 79, in
File “convertensorflow.py”, line 67, in main
File “acuitylib/vsi_nn.py”, line 60, in load_tensorflow
File “acuitylib/app/importer/import_tensorflow.py”, line 48, in run
File “acuitylib/app/importer/import_tensorflow.py”, line 43, in import_tf_ruler_module
ImportError: No module named ‘tfruler’
[6351] Failed to execute script convertensorflow

I have tried find import_tensorflow.py , but I can’t find it. Could anyone help me ?

1 Like

@heaven7 This should be defined in your neural network, this may be a node that the conversion tool does not support

@Frank my module use tensorflow 1.4.x. convert tool use 2.0.0+ . Is this cause?

@heaven7 If you model can run with TF 2.0 in PC ,it should be no impact .

I’m still stuck with the model conversion.

Could you guys give a tensorflow demo other than yolo demo?
I am getting same error. “ImportError: No module named ‘tfruler’”

Same problem here. Followed the SDK user guide to run the script( and I have to even change some of the script to make it run successfully) and the demo seems to meet the same problem.
No module named ‘tfruler’. confusing.

I have solved my problem here!
For those who have met the similar problem(No module named ‘tfruler’), please carefully make sure that the tfruler document folder is under the acuitylib folder and is exactly where your convertensorflow document is in. (as the script runs and finds the tfruler in the same folder of convertensorflow)

2 Likes