MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / load_weights

Function load_weights

examples/tensorrt/vit/plugin_loader.py:22–27  ·  view source on GitHub ↗
(weight_path:str)

Source from the content-addressed store, hash-verified

20from scipy import ndimage
21
22def load_weights(weight_path:str):
23 suffix = weight_path.split('.')[-1]
24 if suffix != 'npz':
25 print("Unsupported weight file: Unrecognized format %s " % suffix)
26 exit(-1)
27 return np.load(weight_path)
28
29class ViTPluginLoader:
30 def __init__(self, plugin_path) -> None:

Callers 1

build_networkMethod · 0.70

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected