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

Method __init__

demo/HuggingFace/T5/export.py:227–231  ·  view source on GitHub ↗
(self, encoder)

Source from the content-addressed store, hash-verified

225
226 class TorchModule(Module, GenerationMixin):
227 def __init__(self, encoder):
228 super().__init__()
229 self.encoder = encoder
230 # Use hardcoded value to extend compatibility with older HF versions.
231 self.main_input_name = "input_ids"
232
233 def forward(self, *input, **kwargs):
234 return self.encoder(*input, **kwargs)[0]

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected