TensorRT plugin that addresses issue with two unsupported oprations within l2_normalize TensorFlow operation.
l2_normalize/Maximum: Unsupported binary op max with constant right
l2_normalize/Rsqrt: Unary not supported for other non-constant node
NOTE: as per NVIDIA (r)sqrt operation should be fixed in next release (was not fixed in TensorRT 5.0.6).
Prerequisites:
- TensorFlow freezed (and optimized) 
.pbgraph. - CUDA and TensorRT (tested with Jetpack 4.2 on Xavier)
 - TensorFlow (tested with 1.13.1)
 - cmake >= 3.8
 
Steps:
- 
Clone this repo to Nvidia device and put your
.pbfile assample.pb. - 
Edit
USER DEFINED VALUESvalues instep01_pb_to_uff.pyandstep02_uff_to_plan.cpp. - 
Compile plugin and scripts
 
mkdir build
cd build
cmake ..
make
cd -
- Convert 
.pbto UFF./step01_pb_to_uff.py. This should producesample.uff - Convert UFF to TRT plan 
./build/step02_uff_to_plan. This should producesample.engine 
This plugin was tested with following Keras based network with patch.
- FP16 (half-precision) still not supported (TODO)
 op_type's: 0 - Maximum, 1 - Rsqrt, 2 - Sqrt