

Overview
TensorRT Python API Reference
Represents a TensorRT Network from which the Builder can build an Engine
num_layers –int The number of layers in the network.
num_inputs –int The number of inputs of the network.
num_outputs –int The number of outputs of the network.
num_ranks –int The number of ranks to use for multi-device execution.
name –str The name of the network. This is used so that it can be associated with a built engine. The name must be at most 128 characters in length. TensorRT makes no use of this string except storing it as part of the engine so that it may be retrieved at runtime. A name unique to the builder will be generated by default.
has_implicit_batch_dimension –bool [DEPRECATED] Deprecated in TensorRT 10.0. Always flase since the implicit batch dimensions support has been removed.
error_recorder –IErrorRecorder Application-implemented error reporting interface for TensorRT objects.
A bitset of theNetworkDefinitionCreationFlag s set for this network.
Context managers are deprecated and have no effect. Objects are automatically freed whenthe reference count reaches 0.
Add an activation layer to the network.SeeIActivationLayer for more information.
input – The input tensor to the layer.
type – The type of activation function to apply.
The new activation layer, orNone if it could not be created.
Add a assertion layer.SeeIAssertionLayer for more information.
condition – The condition tensor to the layer.
message – The message to print if the assertion fails.
The new assertion layer, orNone if it could not be created.
Add an attention to the network.SeeIAttention for more information.
query – The 4d query input tensor to the attention.
key – The 4d key input tensor to the attention.
value – The 4d value input tensor to the attention.
normOp – The normalization operation to perform.
causal – The boolean that specifies whether an attention will run casual inference.
The new Attention, orNone if it could not be created.
Add a cast layer.SeeICastLayer for more information.
input – The input tensor to the layer.
to_type – The data type the output tensor should be cast into.
The new cast layer, orNone if it could not be created.
Add a concatenation layer to the network. Note that all tensors must have the same dimension except for the Channel dimension.SeeIConcatenationLayer for more information.
inputs – The input tensors to the layer.
The new concatenation layer, orNone if it could not be created.
Add a constant layer to the network.SeeIConstantLayer for more information.
shape – The shape of the constant.
weights – The constant value, represented as weights.
The new constant layer, orNone if it could not be created.
Add a multi-dimension convolution layer to the network.SeeIConvolutionLayer for more information.
input – The input tensor to the convolution.
num_output_maps – The number of output feature maps for the convolution.
kernel_shape – The dimensions of the convolution kernel.
kernel – The kernel weights for the convolution.
bias – The optional bias weights for the convolution.
The new convolution layer, orNone if it could not be created.
Add a cumulative layer to the network.SeeICumulativeLayer for more information.
input – The input tensor to the layer.
axis – The axis tensor to apply the cumulative operation on. Currently, it must be a build-time constant 0-D shape tensor.
op – The reduction operation to perform.
exclusive – The boolean that specifies whether it is an exclusive cumulative or inclusive cumulative.
reverse – The boolean that specifies whether the cumulative should be applied backward.
The new cumulative layer, orNone if it could not be created.
Add a multi-dimension deconvolution layer to the network.SeeIDeconvolutionLayer for more information.
input – The input tensor to the layer.
num_output_maps – The number of output feature maps.
kernel_shape – The dimensions of the convolution kernel.
kernel – The kernel weights for the convolution.
bias – The optional bias weights for the convolution.
The new deconvolution layer, orNone if it could not be created.
Overloaded function.
add_dequantize(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, scale: tensorrt.tensorrt.ITensor) -> tensorrt.tensorrt.IDequantizeLayer
Add a dequantization layer to the network.See
IDequantizeLayerfor more information.
- arg input:
A tensor to quantize.
- arg scale:
A tensor with the scale coefficients.
- arg output_type:
The datatype of the output tensor. Specifying output_type is optional (default value tensorrt.float32).
- returns:
The new dequantization layer, or
Noneif it could not be created.
add_dequantize(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, scale: tensorrt.tensorrt.ITensor, output_type: tensorrt.tensorrt.DataType) -> tensorrt.tensorrt.IDequantizeLayer
Add a dequantization layer to the network.See
IDequantizeLayerfor more information.
- arg input:
A tensor to quantize.
- arg scale:
A tensor with the scale coefficients.
- arg output_type:
The datatype of the output tensor. Specifying output_type is optional (default value tensorrt.float32).
- returns:
The new dequantization layer, or
Noneif it could not be created.
Add a dynamic quantization layer to the network.SeeIDynamicQuantizeLayer for more information.
input – A tensor to quantize.
axis – The axis that is sliced into blocks.
block_size – The number of elements that are quantized using a shared scale factor.
output_type – The data type of the quantized output tensor.
scale_type – The data type of the scale factor used for quantizing the input data.
The new DynamicQuantization layer, orNone if it could not be created.
Adds an Einsum layer to the network.SeeIEinsumLayer for more information.
inputs – The input tensors to the layer.
equation – The Einsum equation of the layer.
the new Einsum layer, orNone if it could not be created.
Add an elementwise layer to the network.SeeIElementWiseLayer for more information.
input1 – The first input tensor to the layer.
input2 – The second input tensor to the layer.
op – The binary operation that the layer applies.
The input tensors must have the same number of dimensions.For each dimension, their lengths must match, or one of them must be one.In the latter case, the tensor is broadcast along that axis.
The output tensor has the same number of dimensions as the inputs.For each dimension, its length is the maximum of the lengths of thecorresponding input dimension.
The new element-wise layer, orNone if it could not be created.
Overloaded function.
add_fill(self: tensorrt.tensorrt.INetworkDefinition, shape: tensorrt.tensorrt.Dims, op: tensorrt.tensorrt.FillOperation, output_type: tensorrt.tensorrt.DataType) -> tensorrt.tensorrt.IFillLayer
Add a fill layer.See
IFillLayerfor more information.
- arg dimensions:
The output tensor dimensions.
- arg op:
The fill operation that the layer applies.
- arg output_type:
The datatype of the output tensor. Specifying output_type is optional (default value tensorrt.float32).
- returns:
The new fill layer, or
Noneif it could not be created.
add_fill(self: tensorrt.tensorrt.INetworkDefinition, shape: tensorrt.tensorrt.Dims, op: tensorrt.tensorrt.FillOperation) -> tensorrt.tensorrt.IFillLayer
Add a fill layer.See
IFillLayerfor more information.
- arg dimensions:
The output tensor dimensions.
- arg op:
The fill operation that the layer applies.
- arg output_type:
The datatype of the output tensor. Specifying output_type is optional (default value tensorrt.float32).
- returns:
The new fill layer, or
Noneif it could not be created.
Add a gather layer to the network.SeeIGatherLayer for more information.
input – The tensor to gather values from.
indices – The tensor to get indices from to populate the output tensor.
axis – The non-batch dimension axis in the data tensor to gather on.
The new gather layer, orNone if it could not be created.
Add a gather layer to the network.SeeIGatherLayer for more information.
input – The tensor to gather values from.
indices – The tensor to get indices from to populate the output tensor.
mode – The gather mode.
The new gather layer, orNone if it could not be created.
Creates a GridSample layer with a trt.InterpolationMode.LINEAR, unaligned corners, and trt.SampleMode.FILL for 4d-shape input tensors.SeeIGridSampleLayer for more information.
input – The input tensor to the layer.
grid – The grid tensor to the layer.
interpolation_mode – class:InterpolationMode The interpolation mode to use in the layer. Default is LINEAR.
align_corners – class:bool the align mode to use in the layer. Default is False.
padding_mode –SampleMode The padding mode to use in the layer. Default is FILL.
The new grid sample layer, orNone if it could not be created.
Add an identity layer.SeeIIdentityLayer for more information.
input – The input tensor to the layer.
The new identity layer, orNone if it could not be created.
Adds an if-conditional to the network, which provides a way to specify subgraphs that will be conditionally executed using lazy evaluation.SeeIIfConditional for more information.
The new if-condtional, orNone if it could not be created.
Adds an input to the network.
name – The name of the tensor. Each input and output tensor must have a unique name.
dtype – The data type of the tensor.
shape – The dimensions of the tensor.
The newly added Tensor.
Adds a loop to the network, which provides a way to specify a recurrent subgraph.SeeILoop for more information.
The new loop layer, orNone if it could not be created.
Add a LRN layer to the network.SeeILRNLayer for more information.
input – The input tensor to the layer.
window – The size of the window.
alpha – The alpha value for the LRN computation.
beta – The beta value for the LRN computation.
k – The k value for the LRN computation.
The new LRN layer, orNone if it could not be created.
Add a matrix multiply layer to the network.SeeIMatrixMultiplyLayer for more information.
input0 – The first input tensor (commonly A).
op0 – Whether to treat input0 as matrices, transposed matrices, or vectors.
input1 – The second input tensor (commonly B).
op1 – Whether to treat input1 as matrices, transposed matrices, or vectors.
The new matrix multiply layer, orNone if it could not be created.
Overloaded function.
add_nms(self: tensorrt.tensorrt.INetworkDefinition, boxes: tensorrt.tensorrt.ITensor, scores: tensorrt.tensorrt.ITensor, max_output_boxes_per_class: tensorrt.tensorrt.ITensor) -> tensorrt.tensorrt.INMSLayer
Add a non-maximum suppression layer to the network.See
INMSLayerfor more information.
- arg boxes:
The input boxes tensor to the layer.
- arg scores:
The input scores tensor to the layer.
- arg max_output_boxes_per_class:
The maxOutputBoxesPerClass tensor to the layer.
- ivar bounding_box_format:
BoundingBoxFormatThe bounding box format used by the layer. Default is CORNER_PAIRS.- ivar topk_box_limit:
intThe maximum number of filtered boxes considered for selection per batch item. Default is 2000 for SM 5.3 and 6.2 devices, and 5000 otherwise. The TopK box limit must be less than or equal to {2000 for SM 5.3 and 6.2 devices, 5000 otherwise}.- arg indices_type:
The datatype of the output indices tensor. Specifying indices_type is optional (default value tensorrt.int32).
- returns:
The new NMS layer, or
Noneif it could not be created.
add_nms(self: tensorrt.tensorrt.INetworkDefinition, boxes: tensorrt.tensorrt.ITensor, scores: tensorrt.tensorrt.ITensor, max_output_boxes_per_class: tensorrt.tensorrt.ITensor, indices_type: tensorrt.tensorrt.DataType) -> tensorrt.tensorrt.INMSLayer
Add a non-maximum suppression layer to the network.See
INMSLayerfor more information.
- arg boxes:
The input boxes tensor to the layer.
- arg scores:
The input scores tensor to the layer.
- arg max_output_boxes_per_class:
The maxOutputBoxesPerClass tensor to the layer.
- ivar bounding_box_format:
BoundingBoxFormatThe bounding box format used by the layer. Default is CORNER_PAIRS.- ivar topk_box_limit:
intThe maximum number of filtered boxes considered for selection per batch item. Default is 2000 for SM 5.3 and 6.2 devices, and 5000 otherwise. The TopK box limit must be less than or equal to {2000 for SM 5.3 and 6.2 devices, 5000 otherwise}.- arg indices_type:
The datatype of the output indices tensor. Specifying indices_type is optional (default value tensorrt.int32).
- returns:
The new NMS layer, or
Noneif it could not be created.
Overloaded function.
add_non_zero(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor) -> tensorrt.tensorrt.INonZeroLayer
Adds an NonZero layer to the network.See
INonZeroLayerfor more information.
- arg input:
The input tensor to the layer.
- arg indices_type:
The datatype of the output indices tensor. Specifying indices_type is optional (default value tensorrt.int32).
- returns:
the new NonZero layer, or
Noneif it could not be created.
add_non_zero(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, indices_type: tensorrt.tensorrt.DataType) -> tensorrt.tensorrt.INonZeroLayer
Adds an NonZero layer to the network.See
INonZeroLayerfor more information.
- arg input:
The input tensor to the layer.
- arg indices_type:
The datatype of the output indices tensor. Specifying indices_type is optional (default value tensorrt.int32).
- returns:
the new NonZero layer, or
Noneif it could not be created.
Adds a Normalization layer to the network.SeeNormalization for more information.
input – The input tensor to the layer.
scale – The scale tensor used to scale the normalized output.
bias – The bias tensor used to scale the normalized output.
axesMask – The axes on which to perform mean calculations.The bit in position i of bitmask axes corresponds to explicit dimension i of the result.E.g., the least significant bit corresponds to the first explicit dimension and the next to leastsignificant bit corresponds to the second explicit dimension.
the new Normalization layer, orNone if it could not be created.
Add a OneHot layer to the network.SeeIOneHotLayer for more information.
indices – The tensor to get indices from to populate the output tensor.
values – The tensor to get off (cold) value and on (hot) value
depth – The tensor to get depth (number of classes) of one-hot encoding
axis – The axis to append the one-hot encoding to
The new OneHot layer, orNone if it could not be created.
Add a multi-dimensional padding layer to the network.SeeIPaddingLayer for more information.
input – The input tensor to the layer.
pre_padding – The padding to apply to the start of the tensor.
post_padding – The padding to apply to the end of the tensor.
The new padding layer, orNone if it could not be created.
Add a parametric ReLU layer.SeeIParametricReLULayer for more information.
input – The input tensor to the layer.
slopes – The slopes tensor (input elements are multiplied with the slopes where the input is negative).
The new parametric ReLU layer, orNone if it could not be created.
Overloaded function.
add_plugin(self: tensorrt.tensorrt.INetworkDefinition, tuple: tuple) -> tensorrt.tensorrt.IPluginV3Layer
add_plugin(self: tensorrt.tensorrt.INetworkDefinition, func: function) -> tensorrt.tensorrt.IPluginV3Layer
add_plugin(self: tensorrt.tensorrt.INetworkDefinition, func: function, aot: bool) -> tensorrt.tensorrt.IPluginV3Layer
Add a plugin layer to the network using anIPluginV2 interface.SeeIPluginV2 for more information.
inputs – The input tensors to the layer.
plugin – The layer plugin.
The new plugin layer, orNone if it could not be created.
Add a plugin layer to the network using anIPluginV3 interface.SeeIPluginV3 for more information.
inputs – The input tensors to the layer.
shape_inputs – The shape input tensors to the layer.
plugin – The layer plugin.
The new plugin layer, orNone if it could not be created.
Add a multi-dimension pooling layer to the network.SeeIPoolingLayer for more information.
input – The input tensor to the layer.
type – The type of pooling to apply.
window_size – The size of the pooling window.
The new pooling layer, orNone if it could not be created.
Overloaded function.
add_quantize(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, scale: tensorrt.tensorrt.ITensor) -> tensorrt.tensorrt.IQuantizeLayer
Add a quantization layer to the network.See
IQuantizeLayerfor more information.
- arg input:
A tensor to quantize.
- arg scale:
A tensor with the scale coefficients.
- arg output_type:
The datatype of the output tensor. Specifying output_type is optional (default value tensorrt.int8).
- returns:
The new quantization layer, or
Noneif it could not be created.
add_quantize(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, scale: tensorrt.tensorrt.ITensor, output_type: tensorrt.tensorrt.DataType) -> tensorrt.tensorrt.IQuantizeLayer
Add a quantization layer to the network.See
IQuantizeLayerfor more information.
- arg input:
A tensor to quantize.
- arg scale:
A tensor with the scale coefficients.
- arg output_type:
The datatype of the output tensor. Specifying output_type is optional (default value tensorrt.int8).
- returns:
The new quantization layer, or
Noneif it could not be created.
Add a ragged softmax layer to the network.SeeIRaggedSoftMaxLayer for more information.
input – The ZxS input tensor.
bounds – The Zx1 bounds tensor.
The new ragged softmax layer, orNone if it could not be created.
Add a reduce layer to the network.SeeIReduceLayer for more information.
input – The input tensor to the layer.
op – The reduction operation to perform.
axes – The reduction dimensions.The bit in position i of bitmask axes corresponds to explicit dimension i of the result.E.g., the least significant bit corresponds to the first explicit dimension and the next to leastsignificant bit corresponds to the second explicit dimension.
keep_dims – The boolean that specifies whether or not to keep the reduced dimensions in the output of the layer.
The new reduce layer, orNone if it could not be created.
Add a resize layer.SeeIResizeLayer for more information.
input – The input tensor to the layer.
The new resize layer, orNone if it could not be created.
Adds a ReverseSequence layer to the network.SeeIReverseSequenceLayer for more information.
input – The input tensor to the layer.
sequence_lens – 1D tensor specifying lengths of sequences to reverse in a batch. The length ofsequence_lens must be equal to the size of the dimension ininput specified bybatch_axis.
the new ReverseSequence layer, orNone if it could not be created.
Add a scale layer to the network.SeeIScaleLayer for more information.
input – The input tensor to the layer. This tensor is required to have a minimum of 3 dimensions.
mode – The scaling mode.
shift – The shift value.
scale – The scale value.
power – The power value.
If the weights are available, then the size of weights are dependent on the ScaleMode.For UNIFORM, the number of weights is equal to 1.For CHANNEL, the number of weights is equal to the channel dimension.For ELEMENTWISE, the number of weights is equal to the volume of the input.
The new scale layer, orNone if it could not be created.
Add a multi-dimension scale layer to the network.SeeIScaleLayer for more information.
input – The input tensor to the layer. This tensor is required to have a minimum of 3 dimensions.
mode – The scaling mode.
shift – The shift value.
scale – The scale value.
power – The power value.
channel_axis – The channel dimension axis.
If the weights are available, then the size of weights are dependent on the ScaleMode.For UNIFORM, the number of weights is equal to 1.For CHANNEL, the number of weights is equal to the channel dimension.For ELEMENTWISE, the number of weights is equal to the volume of the input.
The new scale layer, orNone if it could not be created.
Add a scatter layer to the network.SeeIScatterLayer for more information.
data – The tensor to get default values from.
indices – The tensor to get indices from to populate the output tensor.
updates – The tensor to get values from to populate the output tensor.
mode – operation mode see IScatterLayer for more info
The new Scatter layer, orNone if it could not be created.
Add a select layer.SeeISelectLayer for more information.
condition – The condition tensor to the layer.
then_input – The then input tensor to the layer.
else_input – The else input tensor to the layer.
The new select layer, orNone if it could not be created.
Add a shape layer to the network.SeeIShapeLayer for more information.
input – The input tensor to the layer.
The new shape layer, orNone if it could not be created.
Add a shuffle layer to the network.SeeIShuffleLayer for more information.
input – The input tensor to the layer.
The new shuffle layer, orNone if it could not be created.
Add a slice layer to the network.SeeISliceLayer for more information.
input – The input tensor to the layer.
start – The start offset.
shape – The output shape.
stride – The slicing stride. Positive, negative, zero stride values, and combinations of them in different dimensions are allowed.
The new slice layer, orNone if it could not be created.
Add a softmax layer to the network.SeeISoftMaxLayer for more information.
input – The input tensor to the layer.
The new softmax layer, orNone if it could not be created.
Adds a Squeeze layer to the network.SeeISqueezeLayer for more information.
input – The input tensor to the layer.
axes – The tensor containing axes to remove. Must be resolvable to a constant Int32 or Int64 1D shape tensor.
the new Squeeze layer, orNone if it could not be created.
Overloaded function.
add_topk(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, op: tensorrt.tensorrt.TopKOperation, k: int, axes: int) -> tensorrt.tensorrt.ITopKLayer
Add a TopK layer to the network.See
ITopKLayerfor more information.The TopK layer has two outputs of the same dimensions. The first contains data values, the second contains index positions for the values. Output values are sorted, largest first for operation
TopKOperation.MAXand smallest first for operationTopKOperation.MIN.Currently only values of K up to 3840 are supported.
- arg input:
The input tensor to the layer.
- arg op:
Operation to perform.
- arg k:
Number of elements to keep.
- arg axes:
The reduction dimensions.The bit in position i of bitmask axes corresponds to explicit dimension i of the result.E.g., the least significant bit corresponds to the first explicit dimension and the next to leastsignificant bit corresponds to the second explicit dimension.Currently axes must specify exactly one dimension, and it must be one of the last four dimensions.
- arg indices_type:
The datatype of the output indices tensor. Specifying indices_type is optional (default value tensorrt.int32).
- returns:
The new TopK layer, or
Noneif it could not be created.
add_topk(self: tensorrt.tensorrt.INetworkDefinition, input: tensorrt.tensorrt.ITensor, op: tensorrt.tensorrt.TopKOperation, k: int, axes: int, indices_type: tensorrt.tensorrt.DataType) -> tensorrt.tensorrt.ITopKLayer
Add a TopK layer to the network.See
ITopKLayerfor more information.The TopK layer has two outputs of the same dimensions. The first contains data values, the second contains index positions for the values. Output values are sorted, largest first for operation
TopKOperation.MAXand smallest first for operationTopKOperation.MIN.Currently only values of K up to 3840 are supported.
- arg input:
The input tensor to the layer.
- arg op:
Operation to perform.
- arg k:
Number of elements to keep.
- arg axes:
The reduction dimensions.The bit in position i of bitmask axes corresponds to explicit dimension i of the result.E.g., the least significant bit corresponds to the first explicit dimension and the next to leastsignificant bit corresponds to the second explicit dimension.Currently axes must specify exactly one dimension, and it must be one of the last four dimensions.
- arg indices_type:
The datatype of the output indices tensor. Specifying indices_type is optional (default value tensorrt.int32).
- returns:
The new TopK layer, or
Noneif it could not be created.
Add a unary layer to the network.SeeIUnaryLayer for more information.
input – The input tensor to the layer.
op – The operation to apply.
The new unary layer, orNone if it could not be created.
Adds an Unsqueeze layer to the network.SeeIUnsqueezeLayer for more information.
input – The input tensor to the layer.
axes – The tensor containing axes to add. Must be resolvable to a constant Int32 or Int64 1D shape tensor.
the new Unsqueeze layer, orNone if it could not be created.
Whether the weight has been marked as refittable.
name – The name of the weights to check.
The builder from which this INetworkDefinition was created.
SeeIBuilder for more information.
Returns true if the specifiedNetworkDefinitionCreationFlag is set.
flag – TheNetworkDefinitionCreationFlag .
Whether the flag is set.
Get the input tensor specified by the given index.
index – The index of the input tensor.
The tensor, orNone if it is out of range.
Get the layer specified by the given index.
index – The index of the layer.
The layer, orNone if it is out of range.
Get the output tensor specified by the given index.
index – The index of the output tensor.
The tensor, orNone if it is out of range.
Check if a tensor is marked as debug.
tensor – The tensor to be checked.
Mark a tensor as a debug tensor in the network.
tensor – The tensor to be marked as debug tensor.
True on success, False otherwise.
Mark a tensor as an output.
tensor – The tensor to mark.
Enable tensor’s value to be computed byIExecutionContext.get_shape_binding().
tensor – The tensor to unmark as an output tensor. The tensor must be of typeint32 and have no more than one dimension.
True if successful,False if tensor is already marked as an output.
Mark unfused tensors as debug tensors.
Debug tensors can be optionally emitted at runtime.Tensors that are fused by the optimizer will not be emitted.Tensors marked this way will not prevent fusion like mark_debug() does, thus preserving performance.
Tensors marked this way cannot be detected by is_debug_tensor().DebugListener can only get internal tensor names instead of the original tensor names in the NetworkDefinition for tensors marked this way.But the names correspond to the names obtained by IEngineInspector.There is no guarantee that all unfused tensors are marked.
True if tensors were successfully marked (or were already marked), false otherwise.
Mark a weight as refittable.
name – The weight to mark.
Remove a tensor from the network.
tensor – The tensor to remove
It is illegal to remove a tensor that is the input or output of a layer.if this method is called with such a tensor, a warning will be emitted on the logand the call will be ignored.
Associate a name with all current uses of the given weights.
The name must be set after the Weights are used in the network.Lookup is associative. The name applies to all Weights with matchingtype, value pointer, and count. If Weights with a matching valuepointer, but different type or count exists in the network, anerror message is issued, the name is rejected, and return false.If the name has already been used for other weights,return false. None causes the weights to become unnamed,i.e. clears any previous name.
weights – The weights to be named.
name – The name to associate with the weights.
true on success.
Unmark a tensor as a debug tensor in the network.
tensor – The tensor to be unmarked as debug tensor.
True on success, False otherwise.
Unmark a tensor as a network output.
tensor – The tensor to unmark as an output tensor.
Undomark_output_for_shapes() .
tensor – The tensor to unmark as an output tensor.
True if successful,False if tensor is not marked as an output.
Undo the marking of unfused tensor as debug tensors.
This has no effect on tensors marked by mark_debug().
True if tensor successfully unmarked (or was already unmarked), false otherwise.
Unmark a weight as refittable.
name – The weight to unmark.
INetworkDefinitionINetworkDefinition.__del__()INetworkDefinition.__exit__()INetworkDefinition.__getitem__()INetworkDefinition.__init__()INetworkDefinition.__len__()INetworkDefinition.add_activation()INetworkDefinition.add_assertion()INetworkDefinition.add_attention()INetworkDefinition.add_cast()INetworkDefinition.add_concatenation()INetworkDefinition.add_constant()INetworkDefinition.add_convolution_nd()INetworkDefinition.add_cumulative()INetworkDefinition.add_deconvolution_nd()INetworkDefinition.add_dequantize()INetworkDefinition.add_dynamic_quantize()INetworkDefinition.add_einsum()INetworkDefinition.add_elementwise()INetworkDefinition.add_fill()INetworkDefinition.add_gather()INetworkDefinition.add_gather_v2()INetworkDefinition.add_grid_sample()INetworkDefinition.add_identity()INetworkDefinition.add_if_conditional()INetworkDefinition.add_input()INetworkDefinition.add_loop()INetworkDefinition.add_lrn()INetworkDefinition.add_matrix_multiply()INetworkDefinition.add_nms()INetworkDefinition.add_non_zero()INetworkDefinition.add_normalization()INetworkDefinition.add_one_hot()INetworkDefinition.add_padding_nd()INetworkDefinition.add_parametric_relu()INetworkDefinition.add_plugin()INetworkDefinition.add_plugin_v2()INetworkDefinition.add_plugin_v3()INetworkDefinition.add_pooling_nd()INetworkDefinition.add_quantize()INetworkDefinition.add_ragged_softmax()INetworkDefinition.add_reduce()INetworkDefinition.add_resize()INetworkDefinition.add_reverse_sequence()INetworkDefinition.add_scale()INetworkDefinition.add_scale_nd()INetworkDefinition.add_scatter()INetworkDefinition.add_select()INetworkDefinition.add_shape()INetworkDefinition.add_shuffle()INetworkDefinition.add_slice()INetworkDefinition.add_softmax()INetworkDefinition.add_squeeze()INetworkDefinition.add_topk()INetworkDefinition.add_unary()INetworkDefinition.add_unsqueeze()INetworkDefinition.are_weights_marked_refittable()INetworkDefinition.builderINetworkDefinition.get_flag()INetworkDefinition.get_input()INetworkDefinition.get_layer()INetworkDefinition.get_output()INetworkDefinition.is_debug_tensor()INetworkDefinition.mark_debug()INetworkDefinition.mark_output()INetworkDefinition.mark_output_for_shapes()INetworkDefinition.mark_unfused_tensors_as_debug_tensors()INetworkDefinition.mark_weights_refittable()INetworkDefinition.remove_tensor()INetworkDefinition.set_weights_name()INetworkDefinition.unmark_debug()INetworkDefinition.unmark_output()INetworkDefinition.unmark_output_for_shapes()INetworkDefinition.unmark_unfused_tensors_as_debug_tensors()INetworkDefinition.unmark_weights_refittable()