blob: 4e523ee66b48ad7e51013e2b84fd2591ad34cc4e (
plain)
1
2
3
4
5
6
7
|
def remove_prefix(text, prefix):
return text[text.startswith(prefix) and len(prefix):]
nps = {}
for k, v in model.state_dict().items():
k = remove_prefix(k, 'module_list.')
nps[k] = v.detach().numpy()
np.savez('yolo-v3.ot', **nps)
|