Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Add a 'clipped(min:max:)' method. #198

Merged
merged 10 commits into from
Jun 16, 2019
Merged

Add a 'clipped(min:max:)' method. #198

merged 10 commits into from
Jun 16, 2019

Conversation

Shashi456
Copy link
Contributor

@Shashi456 Shashi456 commented Jun 11, 2019

Refer discussion here.

I need some help here though, I'm sure this needs a vjp as well but what would a vjp for this look like?

Currently getting this error from the build :

      error: cannot convert value of type 'Tensor<Scalar>' to expected argument type 'Tensor<_>'

      return Raw.clipByValue(t: self, clipValueMin: minimum, clipValueMax: maximum)
                                ^~~~
                                     as! Tensor<_>

FInally, min and max have a default value of -infinity and +infinity, do we have those identifiers in swift?

@Shashi456
Copy link
Contributor Author

Shashi456 commented Jun 11, 2019

cc: @eaplatanios @rxwei

@rxwei rxwei requested review from eaplatanios, rxwei and dan-zheng June 11, 2019 08:45
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@Shashi456
Copy link
Contributor Author

Sorry for the trivial errors.

Copy link
Contributor

@saeta saeta left a comment

Choose a reason for hiding this comment

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

This is looking very close to me. Could you make one additional quick-fix?

Thank you for all these PR's!

@rxwei
Copy link
Contributor

rxwei commented Jun 15, 2019

If you pull from master, failures regarding move(along:) should be fixed.

@rxwei rxwei changed the title Adding clipped function Add a 'clipped(min:max:)' method. Jun 15, 2019
@Shashi456
Copy link
Contributor Author

@rxwei this can be merged now.

@rxwei rxwei merged commit d80ec3b into tensorflow:master Jun 16, 2019
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.

6 participants