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

Added support for 'softplus' and 'logSigmoid' and their VJPs. #148

Closed
wants to merge 14 commits into from

Conversation

eaplatanios
Copy link
Contributor

No description provided.

@eaplatanios eaplatanios changed the title Added support for 'softplus' and 'logSigmoid'. Added support for 'softplus' and 'logSigmoid' and their VJPs. May 31, 2019
@rxwei rxwei added the enhancement New feature or request label May 31, 2019
@rxwei rxwei self-assigned this May 31, 2019
@rxwei
Copy link
Contributor

rxwei commented Jun 13, 2019

Is this blocked on any other PR? If not, could you resolve the conflicts?

@eaplatanios
Copy link
Contributor Author

I don't think it's blocked. I'll resolve the conflicts later today because I'm currently at a conference.

@eaplatanios
Copy link
Contributor Author

@rxwei I finally updated this and ran tests locally. It should be ready to merge. The only failing tests I see have to do with the lazy tensor implementation and so are not relevant to this PR.

@eaplatanios
Copy link
Contributor Author

Also verified that all CI tests pass.

@@ -923,6 +923,14 @@ internal func _vjpSigmoid<T: TensorFlowFloatingPoint>(
(sigmoid(x), { v in Raw.sigmoidGrad(x, dy: v) })
}

/// Returns the log-sigmoid of the specified tensor element-wise. Specifically,
/// `y = log(1 / (1 + exp(-x)))`. For numerical stability, we use `y = -softplus(-x)`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// `y = log(1 / (1 + exp(-x)))`. For numerical stability, we use `y = -softplus(-x)`.
/// `log(1 / (1 + exp(-x)))`. For numerical stability, we use `-softplus(-x)`.

@eaplatanios
Copy link
Contributor Author

@rxwei this was actually merged as part of #157. I realized I mixed up the PRs while trying to keep them updated in my local branches. I'll go through and see which ones remain now.

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

Successfully merging this pull request may close these issues.

4 participants