model accuracy penalty with tensorRT on jetson TX2

Hi,

Im using TensorRT for inference of a keras model on tensorRT on a Jetson TX2 device.
The model outputs are different when compared to the outputs of the keras model, leading to lower accuracy.

cuda version 9.0.252
tensorrt version 4.1.3

(on host) model is taken from: https://github.com/uzh-rpg/rpg_public_dronet/tree/master/model
(on host) keras to tensorflow pb translation is done with: GitHub - amir-abdi/keras_to_tensorflow: General code to convert a trained keras model into an inference tensorflow model
pb to uff is done with: import tensorflow as tfimport sysfrom tensorflow.python.platform import gfil - Pastebin.com (adapted from an nvidia samples)
engine creation and inference code: int inference(void* p_engine, void* p_context, float *input_img, float output_ar - Pastebin.com (adapted from nvidia UFF MNIST sample)

I suspected that the data ordering was the source for the issue (CHW vs HWC), but since im using only grayscale images it would not make that much difference, so in the end im not sure what is the issue.
perhaps TRT is doing some optimizations that impact the accuracy?

BR
Sagiv