◆ __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.
◆ __call__()
def polygraphy.backend.trt.loader.ModifyNetwork.__call__ |
( |
|
self | ) |
|
Modifies a TensorRT ``INetworkDefinition``.
Returns:
trt.INetworkDefinition: The modified network.
◆ _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: