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

Function tune_input_shape

tools/test_runner.py:227–236  ·  view source on GitHub ↗
(model, input_data)

Source from the content-addressed store, hash-verified

225
226
227def tune_input_shape(model, input_data):
228 param_shapes = model.get_parameter_shapes()
229 input_shapes = {}
230 for name, s in param_shapes.items():
231 assert name in input_data
232 data_shape = list(input_data[name].shape)
233 if not np.array_equal(data_shape, s.lens()):
234 input_shapes[name] = data_shape
235
236 return input_shapes
237
238
239def main():

Callers 1

mainFunction · 0.85

Calls 2

lensMethod · 0.80
get_parameter_shapesMethod · 0.45

Tested by

no test coverage detected