Get an Error when Convert frozen graph to TensorRT engine

when I followed “TensorFlow->TensorRT Image Classification” instruction in this website https://github.com/NVIDIA-AI-IOT/tf_to_trt_image_classification#models
and run the following:

python scripts/convert_plan.py data/frozen_graphs/inception_v1.pb data/plans/inception_v1.plan input 224 224 InceptionV1/Logits/SpatialSqueeze 1 0 float

I got this error messages

sudo python scripts/convert_plan.py data/frozen_graphs/inception_v1.pb data/plans/inception_v1.plan input 224 224 InceptionV1/Logits/SpatialSqueeze 1 0 float
Using output node InceptionV1/Logits/SpatialSqueeze
Converting to UFF graph
Warning: No conversion function registered for layer: FusedBatchNormV3 yet.
Converting as custom op FusedBatchNormV3 InceptionV1/InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/FusedBatchNormV3
name: "InceptionV1/InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/FusedBatchNormV3"
op: "FusedBatchNormV3"
input: "InceptionV1/InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/Conv2D"
input: "InceptionV1/InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/Const"
input: "InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/beta/read"
input: "InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_mean/read"
input: "InceptionV1/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/moving_variance/read"
attr {
  key: "T"
  value {
    type: DT_FLOAT
  }
}
attr {
  key: "U"
  value {
    type: DT_FLOAT
  }
}
attr {
  key: "data_format"
  value {
    s: "NHWC"
  }
}
attr {
  key: "epsilon"
  value {
    f: 0.001
  }
}
attr {
  key: "is_training"
  value {
    b: false
  }
}

Traceback (most recent call last):
  File "scripts/convert_plan.py", line 71, in <module>
    data_type
  File "scripts/convert_plan.py", line 22, in frozenToPlan
    text=False,
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 103, in from_tensorflow_frozen_model
    return from_tensorflow(graphdef, output_nodes, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 75, in from_tensorflow
    name="main")
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 64, in convert_tf2uff_graph
    uff_graph, input_replacements)
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 51, in convert_tf2uff_node
    op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes)
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 28, in convert_layer
    fields = cls.parse_tf_attrs(tf_node.attr)
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 177, in parse_tf_attrs
    for key, val in attrs.items()}
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 177, in <dictcomp>
    for key, val in attrs.items()}
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 172, in parse_tf_attr_value
    return cls.convert_tf2uff_field(code, val)
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 140, in convert_tf2uff_field
    return float(val)
TypeError: float() argument must be a string or a number

But if I activate my virtual env and run again I got this kind of error messages

No. nodes: 486
UFF Output written to data/tmp.uff
UffParser: Validator error: InceptionV1/InceptionV1/Mixed_5c/Branch_0/Conv2d_0a_1x1/BatchNorm/FusedBatchNormV3: Unsupported operation _FusedBatchNormV3
Failed to parse UFF

Does anyone can tell me how to solve this error?
thanks

Hi,

This error indicates that one layer within your model is not supported by the TensorRT

UffParser: Validator error: .. Unsupported operation _FusedBatchNormV3

You can find TensorRT support matrix here:

A possible solution is to use ONNX model as intermediate format. TF->ONNX->TRT.
Please see this comment for more information:
https://devtalk.nvidia.com/default/topic/1064123/tensorrt/unsupported-operation-_fusedbatchnormv3/post/5404044/#5404044

Thanks.

Thanks for the answering.

I will try to fix it.