MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / squeeze

Method squeeze

tensorrt_llm/runtime/session.py:76–80  ·  view source on GitHub ↗
(self, dim=0)

Source from the content-addressed store, hash-verified

74 return self.shape[0]
75
76 def squeeze(self, dim=0):
77 if self.shape[dim] != 1:
78 raise ValueError(f"dim {dim} is {self.shape[dim]} instead of 1!")
79 return TensorInfo(self.name, self.dtype,
80 self.shape[:dim] + self.shape[dim + 1:])
81
82
83class Session(object):

Callers 15

preprocessMethod · 0.95
build_llava_engineFunction · 0.45
forwardMethod · 0.45
load_weights_vanillaMethod · 0.45
applyMethod · 0.45
selective_state_updateFunction · 0.45
causal_conv1d_updateFunction · 0.45

Calls 1

TensorInfoClass · 0.85

Tested by

no test coverage detected