Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A name can be used as both Input/Output #125

Open
shinh opened this issue Mar 5, 2019 · 0 comments
Open

A name can be used as both Input/Output #125

shinh opened this issue Mar 5, 2019 · 0 comments

Comments

@shinh
Copy link
Member

shinh commented Mar 5, 2019

Probably a bug?

import numpy as np
import chainer
import chainer.functions as F

import onnx_chainer


class Model(chainer.Chain):
    def forward(self, x):
        return F.relu(x), x


model = Model()
x = model.xp.array([2,3], dtype=np.float32)
onnx_chainer.export(model, [x], 'o.onnx')

Output ONNX:

$ python3 -c 'import sys; import onnx; print(onnx.helper.printable_graph(onnx.load(sys.argv[1]).graph))' o.onnx
graph Graph (
  %Input_0[FLOAT, 2]
) {
  %Relu_0 = Relu(%Input_0)
  return %Relu_0, %Input_0
}
@disktnk disktnk self-assigned this Mar 7, 2019
@disktnk disktnk removed their assignment Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants