Commit ce8766c6 authored by Your Name's avatar Your Name
Browse files

修改模型输入数据格式

parent 4d3d722b
......@@ -40,7 +40,7 @@ def migraphx_run(model,cpu,data_tensor):
img_data[i, :, :, :] = data_numpy[i, :, :, :]
# 执行推理
result = model.run({model.get_parameter_names()[0]: migraphx.argument(img_data)})
result = model.run({model.get_parameter_names()[0]: img_data})
# 将结果转换为tensor
result0=torch.from_numpy(np.array(result[0], copy=False)).to(device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment