提交 703e2f5d 编写于 作者: S Smirnov Egor

add output registration test data

上级 ebd991b1
......@@ -1650,3 +1650,19 @@ models_files = os.path.join("models", name + ".onnx")
onnx.save(model, models_files)
########################## const / x ##########################
class OutputRegistration(nn.Module):
def __init__(self):
super(OutputRegistration, self).__init__()
self.c = torch.randn(2, 2)
def forward(self, a, b):
return (a + b) + self.c
a = Variable(torch.randn(2, 2))
b = Variable(torch.randn(2, 2))
model = OutputRegistration()
save_data_and_model_multy_inputs('output_registration', model, a, b)
model = onnx.load('models/output_registration.onnx')
model.graph.node[0].name = model.graph.output[0].name
onnx.save(model, 'models/output_registration.onnx')
\ No newline at end of file
pytorch1.9:

0
124"Add
?3
Constant_1"Constant*$
value*J˿D>A?m(>

2
34Add_2"Addtorch-jit-exportZ
0


Z
1


b
4


B
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册