MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / __init__

Method __init__

demo/HuggingFace/NNDF/models.py:363–376  ·  view source on GitHub ↗

Keeps track of ONNX model file. Does not support loading into memory. Only reads and writes to disk. Args: model (str): Location of the model as fpath OR loaded torch.Model object.

(
        self,
        model: str,
        default_converter: ModelFileConverter = None,
        network_metadata: NetworkMetadata = None,
    )

Source from the content-addressed store, hash-verified

361
362class ONNXModelFile(NNModelFile):
363 def __init__(
364 self,
365 model: str,
366 default_converter: ModelFileConverter = None,
367 network_metadata: NetworkMetadata = None,
368 ):
369 """
370 Keeps track of ONNX model file. Does not support loading into memory. Only reads and writes to disk.
371
372 Args:
373 model (str): Location of the model as fpath OR loaded torch.Model object.
374 """
375 super().__init__(default_converter, network_metadata)
376 self.fpath = model
377
378 def as_onnx_model(
379 self,

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected