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

Allow clip_by_value to get scalar values as threshold #548

Merged
merged 1 commit into from
Nov 28, 2019

Conversation

TakuyaYashima
Copy link
Contributor

Currently, clip_by_value's input is either Variable or NdArray, even for threshold values(min and max). It seems sometimes we just want to pass the scalar value as threshold, so I modified it to take the scalar input as well.

Now it works like;

x = nn.Variable((...))
y = F.clip_by_value(x, 0., 1.)
y.forward() # works

@TakuyaYashima TakuyaYashima added release-note-core Auto-release; Core Engine release-note-ignore Auto-release; Not Appeared in Release Notes and removed release-note-core Auto-release; Core Engine labels Nov 27, 2019
@TakuyaNarihira TakuyaNarihira merged commit b65dede into master Nov 28, 2019
@TakuyaYashima TakuyaYashima added release-note-op-layer Auto-release; Layer Functions and removed release-note-ignore Auto-release; Not Appeared in Release Notes labels Dec 3, 2019
@YukioOobuchi YukioOobuchi deleted the feature/20191025-improve-clippings branch January 20, 2020 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-op-layer Auto-release; Layer Functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants