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

Add output type check #145

Merged
merged 2 commits into from
Apr 15, 2019
Merged

Add output type check #145

merged 2 commits into from
Apr 15, 2019

Conversation

disktnk
Copy link
Member

@disktnk disktnk commented Apr 15, 2019

If the target model returns tuple of ndarray or other value besides chainer.Variable, exporter cannot make computational graph using variable backword. For example, the error message reported in #128 is probably caused by outputs, the target model returns a tuple, and the tuple includes ndarray. On this code https://github.com/chainer/chainercv/blob/v0.12.0/chainercv/links/model/faster_rcnn/faster_rcnn.py#L159 , roi and roi_indices is ndarray, not chainer.Variable

This PR prevent from exporting when flat_output includes not chainer.Variable type.

@disktnk disktnk added this to the 1.4.1 milestone Apr 15, 2019
Copy link
Member

@shinh shinh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@codecov-io
Copy link

codecov-io commented Apr 15, 2019

Codecov Report

Merging #145 into master will increase coverage by 0.29%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage      85%   85.29%   +0.29%     
==========================================
  Files          22       22              
  Lines        1120     1122       +2     
==========================================
+ Hits          952      957       +5     
+ Misses        168      165       -3
Impacted Files Coverage Δ
onnx_chainer/export.py 92.51% <100%> (+1.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffc727c...f230acf. Read the comment docs.

@disktnk
Copy link
Member Author

disktnk commented Apr 15, 2019

ChainerCI, test this please

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit f230acf (8dc36e8):

@disktnk disktnk merged commit aa59c40 into chainer:master Apr 15, 2019
@disktnk disktnk deleted the fix/output-check branch April 15, 2019 08:41
@disktnk disktnk mentioned this pull request Apr 15, 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

Successfully merging this pull request may close these issues.

4 participants