Plugins

class tensorrt.ICaffePluginFactory

Plugin factory used to configure plugins.

create_plugin(self: tensorrt.tensorrt.ICaffePluginFactory, layer_name: str, weights: std::vector<nvinfer1::Weights, std::allocator<nvinfer1::Weights> >) → tensorrt.tensorrt.IPlugin

Creates a plugin.

arg layer_name:Name of layer associated with the plugin.
arg weights:Weights used for the layer.
Returns:The newly created IPlugin .
is_plugin(self: tensorrt.tensorrt.ICaffePluginFactory, layer_name: str) → bool

A user implemented function that determines if a layer configuration is provided by an IPlugin .

Parameters:layer_name – Name of the layer which the user wishes to validate.
Returns:True if the the layer configuration is provided by an IPlugin .
class tensorrt.ICaffePluginFactoryExt

Plugin factory used to configure plugins with added support for TRT versioning.

get_version(self: tensorrt.tensorrt.ICaffePluginFactoryExt) → int

Get the Tensorrt Version.

is_plugin_ext(self: tensorrt.tensorrt.ICaffePluginFactoryExt, layer_name: str) → bool

A user implemented function that determines if a layer configuration is provided by an IPluginExt .

Parameters:layer_name – Name of the layer which the user wishes to validate.
Returns:True if the the layer configuration is provided by an IPluginExt .
class tensorrt.ICaffePluginFactoryV2

Plugin factory used to configure plugins.

create_plugin(self: tensorrt.tensorrt.ICaffePluginFactoryV2, layer_name: str, weights: std::vector<nvinfer1::Weights, std::allocator<nvinfer1::Weights> >) → tensorrt.tensorrt.IPluginV2

Creates a plugin.

arg layer_name:Name of layer associated with the plugin.
arg weights:Weights used for the layer.
Returns:The newly created IPluginV2 .
is_plugin_v2(self: tensorrt.tensorrt.ICaffePluginFactoryV2, layer_name: str) → bool

A user implemented function that determines if a layer configuration is provided by an IPluginV2 .

Parameters:layer_name – Name of the layer which the user wishes to validate.
Returns:True if the the layer configuration is provided by an IPluginV2 .