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

Function load

tools/Polygraphy/polygraphy/json/serde.py:216–224  ·  view source on GitHub ↗
(mode="base64")

Source from the content-addressed store, hash-verified

214 @Decoder.register(np.ndarray)
215 def decode(dct):
216 def load(mode="base64"):
217 if mode == "base64":
218 data = base64.b64decode(dct["array"].encode(), validate=True)
219 elif mode == "latin-1":
220 data = dct["array"].encode(mode)
221 else:
222 assert False, f"Unsupported mode: {mode}"
223 infile = io.BytesIO(data)
224 return np.load(infile, allow_pickle=False)
225
226 try:
227 arr = load()

Callers 2

decodeFunction · 0.85
load_modelMethod · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected