(weight_path:str)
| 20 | from scipy import ndimage |
| 21 | |
| 22 | def 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 | |
| 29 | class ViTPluginLoader: |
| 30 | def __init__(self, plugin_path) -> None: |