MCPcopy Create free account
hub / github.com/OpenGVLab/InternVL / onnx2trt

Function onnx2trt

classification/export.py:73–88  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

71
72
73def onnx2trt(args):
74 from mmdeploy.backend.tensorrt import from_onnx
75
76 onnx_name = f'{args.model_name}.onnx'
77 from_onnx(
78 onnx_name,
79 args.model_name,
80 dict(
81 input=dict(
82 min_shape=[1, 3, args.size, args.size],
83 opt_shape=[1, 3, args.size, args.size],
84 max_shape=[1, 3, args.size, args.size],
85 )
86 ),
87 max_workspace_size=2 ** 30,
88 )
89
90
91def check(args, cfg):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected