TensorRT KeyError: 'shape'

Hi, I am using as an example the script tf_to_trt.py (located at /usr/lib/python3.5/dist-packages/tensorrt/examples/tf_to_trt) to run the optimized inference using TensorRT 4. I am using a frozen graph model trained with Keras (TensorFlow backend), but getting the below errors:

Converting to UFF graph
Warning: No conversion function registered for layer: IteratorGetNext yet.
Converting as custom op IteratorGetNext IteratorGetNext
name: "IteratorGetNext"
op: "IteratorGetNext"
input: "OneShotIterator"
attr {
  key: "_output_shapes"
  value {
    list {
      shape {
        dim {
          size: 8
        }
        dim {
          size: 224
        }
        dim {
          size: 224
        }
        dim {
          size: 3
        }
      }
      shape {
        dim {
          size: 8
        }
        dim {
          size: -1
        }
      }
    }
  }
}
attr {
  key: "output_shapes"
  value {
    list {
      shape {
        dim {
          size: 8
        }
        dim {
          size: 224
        }
        dim {
          size: 224
        }
        dim {
          size: 3
        }
      }
      shape {
        dim {
          size: 8
        }
        dim {
          size: -1
        }
      }
    }
  }
}
attr {
  key: "output_types"
  value {
    list {
      type: DT_FLOAT
      type: DT_INT64
    }
  }
}

Traceback (most recent call last):
  File "tf_to_trt_chest_bhavesh_model.py", line 188, in <module>
    main()
  File "tf_to_trt_chest_bhavesh_model.py", line 158, in main
    uff_model = uff.from_tensorflow(tf_model, ["probs"])
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 120, in from_tenso                                                                 rflow
    name="main")
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 76, in convert_tf2uff_graph
    uff_graph, input_replacements)
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 63, in convert_tf2uff_node
    op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes)
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 38, in convert_layer
    fields = cls.parse_tf_attrs(tf_node.attr)
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 209, in parse_tf_attrs
    for key, val in attrs.items()}
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 209, in <dictcomp>
    for key, val in attrs.items()}
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 204, in parse_tf_attr_value
    return cls.convert_tf2uff_field(code, val)
  File "/usr/lib/python3.5/dist-packages/uff/converters/tensorflow/converter.py", line 189, in convert_tf2uff_fiel                                                                 d
    'type': 'dtype', 'list': 'list'}[code]
KeyError: 'shape'

This error is due to converting a TensorFlow model containing non-supported layers [IteratorGetNext].

Please check if all your layers are supported by TensorRT.

Here is a list of supported layer:
http://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#layers