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

Commit 10f5ba4

Browse files
committed
Trivial Changes and duplications
1 parent 8465e14 commit 10f5ba4

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Sources/TensorFlow/Operators/Math.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,8 @@ internal func _vjpSigmoid<T: TensorFlowFloatingPoint>(
896896
(sigmoid(x), { v in Raw.sigmoidGrad(x, dy: v) })
897897
}
898898

899-
/// Computes the softplus of the specified tensor.
900-
// Specifically, computes `log(exp(features) + 1)`.
899+
/// Computes the softplus of the specified tensor element-wise.
900+
/// Specifically, computes `log(exp(features) + 1)`.
901901
@inlinable
902902
@differentiable(vjp: _vjpSoftplus)
903903
public func softplus<T: TensorFlowFloatingPoint>(_ features: Tensor<T>) -> Tensor<T> {
@@ -911,10 +911,8 @@ internal func _vjpSoftplus<T: TensorFlowFloatingPoint>(
911911
(softplus(features), { v in Raw.softplusGrad(gradients: v, features: features)})
912912
}
913913

914-
/// Computes the softsign of the specified tensor.
914+
/// Computes the softsign of the specified tensor element-wise.
915915
/// Specifically, computes `features/ (abs(features) + 1)`.
916-
/// Computes the softplus of the specified tensor.
917-
// Specifically, computes `log(exp(features) + 1)`.
918916
@inlinable
919917
@differentiable(vjp: _vjpSoftsign)
920918
public func softsign<T: TensorFlowFloatingPoint>(_ features: Tensor<T>) -> Tensor<T> {

Tests/TensorFlowTests/OperatorTests/MathTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ final class MathOperatorTests: XCTestCase {
228228
XCTAssertEqual(x, expected)
229229
}
230230

231-
func testSoftsign() {
232-
233-
}
234-
235231
func testXORInference() {
236232
func xor(_ x: Float, _ y: Float) -> Float {
237233
let x = Tensor<Float>([x, y]).reshaped(to: [1, 2])

0 commit comments

Comments
 (0)