0

Kears/TensorFlow layer UpSampling2D() cannot be deployed to TensorRT (known behavior).

I am trying to find a solution by replacing the layer UpSampling2D() by other Keras layer with parallel behaviour.

Theoretically Conv2DTranspose() should do the work, by setting specific weights and fixing the weights of the layers in training.

I am looking for some help on how to do that.

Soroush
  • 1,055
  • 2
  • 18
  • 26
YoavEtzioni
  • 85
  • 10

1 Answers1

0

I did a test run by replacing all the UpSampling 2D() with Conv2DTranspose() in my model and then converted it to UFF. (I only trained the model for 1 epoch to save time). The converter then complained about DataFormatVecPermute instead.

Converting conv2d_transpose_1/conv2d_transpose-0-VecPermuteNHWCToNCHW-LayoutOptimizer as custom op: DataFormatVecPermute
Warning: No conversion function registered for layer: DataFormatVecPermute yet.

And the parser in C++ couldn't parse this model successfully either.

Yayuchen
  • 301
  • 3
  • 6