model inference is wrong

Hi, i convert my model(the architecture is as below) from TensorFlow PB file to Uff file

input -> conv1+pooling -> conv2+pooling -> conv3+pooling 

      -> conv4+pooling -> flatten -> Dense(FC)(leaky-relu) -> Dense(FC) -> output1
                                                           |
                                                           |-> Dense(FC) -> output2

1. The activation of each conv is Leaky relu
2. There are two output nodes

There is no warning of unsupported node during model conversion and here is the result.

WARNING: To create TensorRT plugin nodes, please use the `create_plugin_node` function instead.
UFF Version 0.5.5
=== Automatically deduced input nodes ===
[name: "InputImage"
op: "Placeholder"
attr {
  key: "dtype"
  value {
    type: DT_FLOAT
  }
}
attr {
  key: "shape"
  value {
    shape {
      dim {
        size: 1
      }
      dim {
        size: 1
      }
      dim {
        size: 64
      }
      dim {
        size: 64
      }
    }
  }
}
]
=========================================

Using output node net/obj_fc/BiasAdd
Using output node net/cls_fc/BiasAdd
Converting to UFF graph
DEBUG: convert reshape to flatten node
No. nodes: 50
UFF Output written to ../model/my_model.uff
UFF Text Output written to ../model/my_model.pbtxt

And i follow sampleUFFSSD and uff_custom_plugin to write a cpp program for running the model, these steps are what i do in my code.

1. Parse UFF model and register 1 input and 2 output node name
2. Build the Engine
3. Execute the engine (cude memory allocate with input and output binding index, copy prediction from cuda memory after execution)

But the prediction of net/obj_fc/BiasAdd and net/cls_fc/BiasAdd are wrong.

i have checked the code several times but i have no idea what is wrong.

Can anyone tell me which part might be wrong ?

Thanks

i solve the problem

according to https://devtalk.nvidia.com/default/topic/1036228/tensorrt/fc-layer-unsupported-with-trt/

For flatten layer, i change my model from

flatten = tf.layers.flatten(x)

to

net_shape = x.get_shape().as_list()
# because shape[0] is None, you need to use tf.shape(x)[0] instead of x.get_shape()[0]
flatten = tf.reshape(x, (tf.shape(x)[0], net_shape[1] * net_shape[2] * net_shape[3]))

and the problem solved