MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / run

Function run

imperative/python/megengine/tools/load_network_and_run.py:159–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157 func.get_static_memory_alloc_info(args.get_static_mem_info)
158
159 def run():
160 if not args.embed_input:
161 for key in inp_dict:
162 inp_dict[key].set_value(mge.Tensor(data[key])._dev_tensor())
163 func.execute()
164 func.wait()
165 return [oup_node.get_value().numpy() for oup_node in output_dict.values()]
166
167 for i in range(args.warm_up):
168 logger.info("warming up {}".format(i))

Callers 1

run_modelFunction · 0.70

Calls 8

_dev_tensorMethod · 0.80
valuesMethod · 0.80
set_valueMethod · 0.45
TensorMethod · 0.45
executeMethod · 0.45
waitMethod · 0.45
numpyMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected