Tensorflow to UFF conversion fails for a simple network

The conversion of the following tensorflow model to UFF fails at tf.matmul operation:

x = tf.placeholder(tf.float32, shape=[None, 1, 1, 100], name="input_x")
y = tf.placeholder(tf.float32, shape=[None, 1, 200, 3], name="input_y")

net = layers.conv2d(x, 100, [1,1], data_format='NHWC')
net = layers.conv2d(net, 200, [1,1], data_format='NHWC')
output = tf.matmul(net, y, name="output")


Warning: No conversion function registered for layer: BatchMatMul yet.
Converting as custom op BatchMatMul output
name: "output"
op: "BatchMatMul"
input: "Conv_1/Relu"
input: "input_y"
attr {
  key: "T"
  value {
    type: DT_FLOAT
attr {
  key: "adj_x"
  value {
    b: false
attr {
  key: "adj_y"
  value {
    b: false

Traceback (most recent call last):
  File "simple_mlp.py", line 69, in <module>
    tf_graph_to_uff(frozen_graph, output_name_list)
  File "simple_mlp.py", line 64, in tf_graph_to_uff
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 75, in from_tensorflow
  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 146, in convert_tf2uff_field
    return TensorFlowToUFFConverter.convert_tf2numpy_dtype(val)
  File "/usr/local/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 74, in convert_tf2numpy_dtype
    return np.dtype(dt[dtype])
TypeError: list indices must be integers, not AttrValue

My actual network have many more conv2d operations after the matmul. So I can think of the following options:

  1. Re-write the entire network using TensorRT c++ API. (similar to sampleMNISTAPI example)
  2. Break the network into two UFF files and then somehow combine them into a single network. I am not sure how feasible is this option.

Is there any other better alternative?

Try https://www.tensorflow.org/versions/r0.12/api_docs/python/math_ops/arithmetic_operators#multiply instead of matmul.