When I try to run a detection program,it raise ValueError: NodeDef mentions attr 'Truncate' not in O...

nvidia@tegra-ubuntu:~/Desktop/detection$ python inference.py --dataset_dir=./ --output_dir=./
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py”, line 418, in import_graph_def
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr ‘Truncate’ not in Op<name=Cast; signature=x:SrcT → y:DstT; attr=SrcT:type; attr=DstT:type>; NodeDef: ToFloat = CastDstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “inference.py”, line 49, in
tf.import_graph_def(od_graph_def, name=‘’)
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/deprecation.py”, line 432, in new_func
return func(*args, **kwargs)
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py”, line 422, in import_graph_def
raise ValueError(str(e))
ValueError: NodeDef mentions attr ‘Truncate’ not in Op<name=Cast; signature=x:SrcT → y:DstT; attr=SrcT:type; attr=DstT:type>; NodeDef: ToFloat = CastDstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).

I believe you have the same problem as I do. The trained model you are using was generated with a newer version of TF, maybe 1.14.0, but Jetson does not support that version yet, so there are things in the model TF on Jetson doesn’t know about , like Truncate in NodeDef, so it throws an error.