honghuichao commented on issue #13759:
URL: https://github.com/apache/tvm/issues/13759#issuecomment-1445630648
@liaojianjin Thanks your warmth extremely!
this has already perplexed me for a long time!
I constructed the following network structure using onnx api:
from onnx import helper
from onnx import TensorProto
dummy_batch_src_corr_points =
helper.make_tensor_value_info("dummy_batch_src_corr_points",TensorProto.FLOAT,["bscp_shape0","bscp_shape1"])
dummy_indices0 =
helper.make_tensor_value_info("dummy_indices0",TensorProto.FLOAT,["i0_shape0","i0_shape1"])
dummy_indices1 =
helper.make_tensor_value_info("dummy_indices1",TensorProto.FLOAT,["i1_shape0","i1_shape1"])
dummy_src_corr_points =
helper.make_tensor_value_info("dummy_src_corr_points",TensorProto.FLOAT,["o_shape0","o_shape1"])
dummy_output =
helper.make_tensor_value_info("output",TensorProto.FLOAT,["o_shape0","o_shape1"])
c4 =
helper.make_node("Constant",[],["4"],value=helper.make_tensor("4",TensorProto.INT32,(1,),(0,)))
c5 =
helper.make_node("Constant",[],["5"],value=helper.make_tensor("5",TensorProto.INT32,(1,),(-1,)))
c7 =
helper.make_node("Constant",[],["7"],value=helper.make_tensor("7",TensorProto.INT32,(1,),(-1,)))
reshape6 = helper.make_node("Reshape",["dummy_indices0","5"],["6"])
reshape8 = helper.make_node("Reshape",["dummy_indices1","7"],["8"])
out =
helper.make_node("ATen",["dummy_batch_src_corr_points","6","8","dummy_src_corr_points","4"],["output"],operator="index_put")
graph_def = helper.make_graph([c4,c5,c7,reshape6,reshape8,out],
"index_put",
[dummy_batch_src_corr_points,
dummy_indices0,
dummy_indices1,
dummy_src_corr_points],
[dummy_output])
model_def = helper.make_model(graph_def)
onnx.checker.check_model(model_def)
onnx.save(model_def,"index_put.onnx")
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]