This repository was archived by the owner on Jul 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Sources/TensorFlow/Operators Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1221,28 +1221,28 @@ internal func _vjpPow<T: TensorFlowFloatingPoint>(
1221
1221
1222
1222
/// Returns the power of the scalar to the tensor, broadcasting the scalar.
1223
1223
@inlinable
1224
- // @differentiable
1224
+ @differentiable ( wrt : rhs where T : TensorFlowFloatingPoint )
1225
1225
public func pow< T: TensorFlowFloatingPoint > ( _ lhs: T , _ rhs: Tensor < T > ) -> Tensor < T > {
1226
1226
pow ( Tensor ( lhs) , rhs)
1227
1227
}
1228
1228
1229
1229
/// Returns the power of the tensor to the scalar, broadcasting the scalar.
1230
1230
@inlinable
1231
- // @differentiable
1231
+ @differentiable ( wrt : lhs where T : TensorFlowFloatingPoint )
1232
1232
public func pow< T: TensorFlowFloatingPoint > ( _ lhs: Tensor < T > , _ rhs: T ) -> Tensor < T > {
1233
1233
pow ( lhs, Tensor ( rhs) )
1234
1234
}
1235
1235
1236
1236
/// Returns the power of the tensor to the scalar, broadcasting the scalar.
1237
1237
@inlinable
1238
- // @differentiable
1238
+ @differentiable
1239
1239
public func pow< T: TensorFlowFloatingPoint > ( _ x: Tensor < T > , _ n: Int ) -> Tensor < T > {
1240
1240
pow ( x, Tensor ( T ( n) ) )
1241
1241
}
1242
1242
1243
1243
/// Returns the element-wise `n`th root of the tensor.
1244
1244
@inlinable
1245
- // @differentiable
1245
+ @differentiable
1246
1246
public func root< T: TensorFlowFloatingPoint > ( _ x: Tensor < T > , _ n: Int ) -> Tensor < T > {
1247
1247
sign ( x) * pow( abs ( x) , Tensor ( T ( 1 ) / T( n) ) )
1248
1248
}
You can’t perform that action at this time.
0 commit comments