Passing parameters to a TensorRT plugin

Is it possible to write a TensorRT plug-in that takes parameters? For example, a custom rescale layer might pass the scaling factor as a parameter…

layer {
name: “rescale”
type: “rescale”
bottom: “in”
top: “out”
rescale_param {
factor = 2


Plugin API doesn’t support parameter parsing.
WAR is to write these settings in a separate file and read it on your own when initialization.


That sounds good. Thank you very much for your response!

Does Plugin API support parameter parsing in tensorrt 3.0


The parameter type differs from the implemented layer.
We leave this control to users who should have more information on it.


What is WAR? Any reference, link, example is appreciated.


You can read the parameter directly in the custom implementation.

It’s been awhile – is it still the case in 6.0, and custom layers need to define/use external configuration?