MCPcopy Index your code
hub / github.com/OpenGVLab/InternVL / get_model

Function get_model

classification/export.py:35–40  ·  view source on GitHub ↗
(args, cfg)

Source from the content-addressed store, hash-verified

33
34
35def get_model(args, cfg):
36 model = build_model(cfg)
37 ckpt = torch.load(args.ckpt, map_location='cpu')['model']
38
39 model.load_state_dict(ckpt)
40 return model
41
42
43def speed_test(model, input):

Callers 2

torch2onnxFunction · 0.85
checkFunction · 0.85

Calls 2

build_modelFunction · 0.90
load_state_dictMethod · 0.80

Tested by

no test coverage detected