honghuichao commented on issue #13759:
URL: https://github.com/apache/tvm/issues/13759#issuecomment-1447684437

   @liaojianjin 
   I tested the above phenomenon is random, and I don't know why. I'm testing 
and trying to solve.
   
   But another case is failed in new code.
   
   from onnx import helper
   from onnx import TensorProto
   # data
   dummy_batch_src_corr_points = 
helper.make_tensor_value_info("dummy_batch_src_corr_points",TensorProto.FLOAT,["bscp_shape0","bscp_shape1"])
   # indices
   dummy_indices0 = 
helper.make_tensor_value_info("dummy_indices0",TensorProto.FLOAT,["i0_shape0"])
   dummy_indices1 = 
helper.make_tensor_value_info("dummy_indices1",TensorProto.FLOAT,[1,])
   # value
   dummy_src_corr_points = 
helper.make_tensor_value_info("dummy_src_corr_points",TensorProto.FLOAT,["v_shape0",])
   #output
   dummy_output = 
helper.make_tensor_value_info("output",TensorProto.FLOAT,["o_shape0","o_shape1"])
   # reshape indices
   c4 = 
helper.make_node("Constant",[],["4"],value=helper.make_tensor("4",TensorProto.INT32,(2,),(-1,1)))
   c5 = 
helper.make_node("Constant",[],["5"],value=helper.make_tensor("5",TensorProto.INT32,(1,),(-1,)))
   reshape_indices0 = helper.make_node("Reshape",["dummy_indices0","4"],["6"])
   reshape_indices1 = helper.make_node("Reshape",["dummy_indices1","5"],["7"])
   op_type = 
helper.make_node("Constant",[],["op_type"],value=helper.make_tensor("op_type",TensorProto.INT32,(1,),(0,)))
   out = 
helper.make_node("ATen",["dummy_batch_src_corr_points","6","7","dummy_src_corr_points","op_type"],["output"],operator="index_put")
   graph_def = 
helper.make_graph([c4,c5,reshape_indices0,reshape_indices1,op_type,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)
   #print(model_def)
   onnx.checker.check_model(model_def)
   onnx.save(model_def,"index_put_new.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]

Reply via email to