hi,
this is my keras model:
inputs = Input(shape=(1,256,1024))
x = Conv2D(1, (15,15), padding='same', strides=(1,1), name = 'conv1', data_format="channels_first")(inputs)
x = Activation('relu', name='actv1')(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name = 'maxpool1')(x)
x = Conv2D(32, (3,3), padding='same', strides=(1,1), name = 'conv2', data_format="channels_first")(x)
x = Activation('relu', name='actv2')(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name = 'maxpool2')(x)
x = Conv2D(64, (3,3), padding='same', strides=(1,1), name = 'conv3', data_format="channels_first")(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name = 'maxpool3')(x)
x = Conv2D(128, (3,3), padding='same', strides=(1,1), name = 'conv4', data_format="channels_first")(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name = 'maxpool4')(x)
x = Flatten()(x)
x = Dense(1000, activation='relu', name = 'dense1')(x)
x = Dense(500, activation='relu',name = 'dense2')(x)
x = Dense(2, activation='softmax',name = 'dense3')(x)
My generated UFF model gave a result that was very off from the correct tensorflow results. However, when i removed the blocks of convolution layers:
inputs = Input(shape=(1,256,1024))
x = Conv2D(1, (15,15), padding='same', strides=(1,1), name = 'conv1', data_format="channels_first")(inputs)
x = Activation('relu', name='actv1')(x)
x = MaxPooling2D((2, 2), strides=(2, 2), name = 'maxpool1')(x)
x = Flatten()(x)
x = Dense(1000, activation='relu', name = 'dense1')(x)
x = Dense(500, activation='relu',name = 'dense2')(x)
x = Dense(2, activation='softmax',name = 'dense3')(x)
The generated UFF model was able to produce consistent results with the tensorflow model.
Is there a bug in TensorRT that is causing some form of wrong optimisation for the convolution block layers? Could someone advise? thanks so much.