This repository was archived by the owner on Jul 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
Sources/TensorFlow/Operators
Tests/TensorFlowTests/OperatorTests Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -896,8 +896,8 @@ internal func _vjpSigmoid<T: TensorFlowFloatingPoint>(
896
896
( sigmoid ( x) , { v in Raw . sigmoidGrad ( x, dy: v) } )
897
897
}
898
898
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)`.
901
901
@inlinable
902
902
@differentiable ( vjp: _vjpSoftplus)
903
903
public func softplus< T: TensorFlowFloatingPoint > ( _ features: Tensor < T > ) -> Tensor < T > {
@@ -911,10 +911,8 @@ internal func _vjpSoftplus<T: TensorFlowFloatingPoint>(
911
911
( softplus ( features) , { v in Raw . softplusGrad ( gradients: v, features: features) } )
912
912
}
913
913
914
- /// Computes the softsign of the specified tensor.
914
+ /// Computes the softsign of the specified tensor element-wise .
915
915
/// Specifically, computes `features/ (abs(features) + 1)`.
916
- /// Computes the softplus of the specified tensor.
917
- // Specifically, computes `log(exp(features) + 1)`.
918
916
@inlinable
919
917
@differentiable ( vjp: _vjpSoftsign)
920
918
public func softsign< T: TensorFlowFloatingPoint > ( _ features: Tensor < T > ) -> Tensor < T > {
Original file line number Diff line number Diff line change @@ -228,10 +228,6 @@ final class MathOperatorTests: XCTestCase {
228
228
XCTAssertEqual ( x, expected)
229
229
}
230
230
231
- func testSoftsign( ) {
232
-
233
- }
234
-
235
231
func testXORInference( ) {
236
232
func xor( _ x: Float , _ y: Float ) -> Float {
237
233
let x = Tensor < Float > ( [ x, y] ) . reshaped ( to: [ 1 , 2 ] )
You can’t perform that action at this time.
0 commit comments