@@ -1294,6 +1294,7 @@ public extension Tensor where Scalar : Numeric {
1294
1294
/// - Parameter axes: The dimensions to reduce.
1295
1295
/// - Precondition: Each value in `axes` must be in the range `-rank..<rank`.
1296
1296
@inlinable @inline ( __always)
1297
+ @differentiable ( wrt: self where Scalar : Differentiable & FloatingPoint)
1297
1298
func mean( alongAxes axes: Int32 ... ) -> Tensor {
1298
1299
return mean ( alongAxes: axes)
1299
1300
}
@@ -1316,6 +1317,7 @@ public extension Tensor where Scalar : Numeric {
1316
1317
/// - Parameter axes: The dimensions to reduce.
1317
1318
/// - Precondition: Each value in `axes` must be in the range `-rank..<rank`.
1318
1319
@inlinable @inline ( __always)
1320
+ @differentiable ( wrt: self where Scalar : Differentiable & FloatingPoint)
1319
1321
func sum( alongAxes axes: Int32 ... ) -> Tensor {
1320
1322
return sum ( alongAxes: axes)
1321
1323
}
@@ -1325,6 +1327,7 @@ public extension Tensor where Scalar : Numeric {
1325
1327
/// - Parameter axes: The dimensions to reduce.
1326
1328
/// - Precondition: Each value in `axes` must be in the range `-rank..<rank`.
1327
1329
@inlinable @inline ( __always)
1330
+ @differentiable ( wrt: self where Scalar : Differentiable & FloatingPoint)
1328
1331
func variance( alongAxes axes: Int32 ... ) -> Tensor {
1329
1332
return variance ( alongAxes: axes)
1330
1333
}
@@ -1334,6 +1337,7 @@ public extension Tensor where Scalar : Numeric {
1334
1337
/// - Parameter axes: The dimensions to reduce.
1335
1338
/// - Precondition: Each value in `axes` must be in the range `-rank..<rank`.
1336
1339
@inlinable @inline ( __always)
1340
+ @differentiable ( wrt: self where Scalar : Differentiable & FloatingPoint)
1337
1341
func variance( alongAxes axes: [ Int32 ] ) -> Tensor {
1338
1342
let mean = self . mean ( alongAxes: axes)
1339
1343
let squaredDiff = ( self - mean) . squared ( )
0 commit comments