Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Pick up the interpolation attributes of Keras's UpSampling2D layers. #71

Closed
wants to merge 3 commits into from

Conversation

kohei-us
Copy link

In ONNX, An Upsample operator may have the mode value of either 'nearest'
or 'linear'. In Keras, UpSampling2D may have the interpolation value of
either 'nearest' or 'bilinear'.

@CLAassistant
Copy link

CLAassistant commented Apr 22, 2019

CLA assistant check
All committers have signed the CLA.

@jiafatom jiafatom self-requested a review April 22, 2019 22:45
Copy link
Collaborator

@jiafatom jiafatom left a comment

Choose a reason for hiding this comment

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

Thanks for the change. (1) Please add a unit test in test_layers.py for linear mode. (2) Please fix build failure for python 3.5.

@kohei-us
Copy link
Author

Hmm... Obviously the version of Keras used in the linux-conda-ci agent does not support the interpolation argument in its UpSampling2D layer implementation...

@jiafatom
Copy link
Collaborator

Hmm... Obviously the version of Keras used in the linux-conda-ci agent does not support the interpolation argument in its UpSampling2D layer implementation...

Let's find since which keras version interpolation argument is supported. Then in unit test, we use
if StrictVersion(keras.version) >= StrictVersion()
to only enable this test for the keras version when interpolation argument is supported.

@jiafatom
Copy link
Collaborator

Just checked https://github.com/keras-team/keras/releases, Add interpolation argument in UpSampling2D layer , in keras 2.2.3

@kohei-us
Copy link
Author

Thanks for your suggestion. I've made changes to check the version of Keras to conditionally disable my test case. Hopefully this will work.

@jiafatom
Copy link
Collaborator

sign CLA please?

@kohei-us
Copy link
Author

sign CLA please?

I need to check with someone in our organization before signing this. Let me work on this, and I'll get back to you.

@jiafatom
Copy link
Collaborator

Also please fix the inline comments about write statements concisely.

In ONNX, An Upsample operator may have the mode value of either 'nearest'
or 'linear'.  In Keras, UpSampling2D may have the interpolation value of
either 'nearest' or 'bilinear'.
@kohei-us
Copy link
Author

Also please fix the inline comments about write statements concisely.

Done.

wenbingl pushed a commit to wenbingl/keras-onnx that referenced this pull request Apr 26, 2019
@jiafatom
Copy link
Collaborator

jiafatom commented Jun 6, 2019

Since cla is stil pending, we apply the fix here instead. Thank you for your contribution.

@jiafatom jiafatom closed this Jun 6, 2019
@kohei-us
Copy link
Author

I know it's too late, but I've finally got approval internally to sign the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants