Unable to use tensorrt 6.0.1.5 python API to implement a BatchNorm Layer

Hello
I try to implement the batch normalization layer using tensorrt IElementWiseLayer. But I found out IElementWiseLayer has no square root operation in it. As we know , the batch norm layer contain a sqrt. How can I implement it? Is there any other API for sqrt ?

Hi,
Square root operation support is part of IUnaryLayer layer (UnaryOperation). Please refer below link for more details:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt-601/tensorrt-api/c_api/namespacenvinfer1.html#aeaeaae08a730508ead278d52b8517a09

Also, BatchNormalization operation is already supported in Caffe and ONNX layer. You can also use caffe and ONNX parser for your model optimization.
https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt-601/tensorrt-support-matrix/index.html

Thanks