TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
polygraphy.backend.trt.loader.ModifyNetwork Class Reference
Inheritance diagram for polygraphy.backend.trt.loader.ModifyNetwork:
Collaboration diagram for polygraphy.backend.trt.loader.ModifyNetwork:

Public Member Functions

def __init__ (self, network, outputs=None, exclude_outputs=None)
 
def __call__ (self)
 

Public Attributes

 outputs
 
 exclude_outputs
 

Private Attributes

 _network
 

Constructor & Destructor Documentation

◆ __init__()

def polygraphy.backend.trt.loader.ModifyNetwork.__init__ (   self,
  network,
  outputs = None,
  exclude_outputs = None 
)
Functor that modifies a TensorRT ``INetworkDefinition``.

Args:
    network (Callable() -> trt.Builder, trt.INetworkDefinition):
    A callable capable of returning a TensorRT Builder and INetworkDefinition. The callable may
    have at most 3 return values if another object needs to be kept alive for the duration of the network,
    e.g., in the case of a parser. The first and second return values must
    always be the builder and network respectively. ModifyNetwork will never take ownership of these.

    outputs (Sequence[str]):
    Names of tensors to mark as outputs. If provided, this will override the outputs
    already marked in the network.
    If a value of `constants.MARK_ALL` is used instead of a list, all tensors in the network are marked.
    exclude_outputs (Sequence[str]):
    Names of tensors to exclude as outputs. This can be useful in conjunction with
    ``outputs=constants.MARK_ALL`` to omit outputs.

Member Function Documentation

◆ __call__()

def polygraphy.backend.trt.loader.ModifyNetwork.__call__ (   self)
Modifies a TensorRT ``INetworkDefinition``.

Returns:
    trt.INetworkDefinition: The modified network.

Member Data Documentation

◆ _network

polygraphy.backend.trt.loader.ModifyNetwork._network
private

◆ outputs

polygraphy.backend.trt.loader.ModifyNetwork.outputs

◆ exclude_outputs

polygraphy.backend.trt.loader.ModifyNetwork.exclude_outputs

The documentation for this class was generated from the following file: