MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / model_parameter_names

Function model_parameter_names

tools/test_runner.py:140–151  ·  view source on GitHub ↗
(model_file_name)

Source from the content-addressed store, hash-verified

138
139
140def model_parameter_names(model_file_name):
141 with open(model_file_name, 'rb') as pfile:
142 data_str = pfile.read()
143 model_proto = onnx.ModelProto()
144 model_proto.ParseFromString(data_str)
145 init_names = set([(i.name) for i in model_proto.graph.initializer])
146 param_names = [
147 input.name for input in model_proto.graph.input
148 if input.name not in init_names
149 ]
150
151 return param_names
152
153
154def model_output_names(model_file_name):

Callers 1

mainFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected