Skip to content

Commit 5a0d15e

Browse files
committed
---
yaml --- r: 293875 b: refs/heads/tensorflow c: 06be74b h: refs/heads/master i: 293873: 966fc8b 293871: 2e8d8cc
1 parent 90aca83 commit 5a0d15e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819-
refs/heads/tensorflow: 878cdf9656e7db6ce9be20fe9719e80d3965d48e
819+
refs/heads/tensorflow: 06be74be84a9cdf89c9f9f4cad78d60b0b842b7e
820820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2

branches/tensorflow/stdlib/public/TensorFlow/Gradients.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,9 @@ func _vjpPow<T : TensorFlowFloatingPoint>(
344344
) -> (Tensor<T>, (Tensor<T>) -> (Tensor<T>, Tensor<T>)) {
345345
let value = pow(x, y)
346346
return (value, { v in
347-
((v * y * pow(x, y-1)).unbroadcast(like: x),
348-
(v * log(x) * value).unbroadcast(like: y))
347+
let dfdx = v * y * pow(x, y-1)
348+
let dfdy = v * log(x) * value
349+
return (dfdx.unbroadcast(like: x), dfdy.unbroadcast(like: y))
349350
})
350351
}
351352

branches/tensorflow/stdlib/public/TensorFlow/Ops.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,7 @@ internal extension Tensor.IndexPath {
19231923
@inlinable
19241924
init(_ ranges: [TensorRange]) {
19251925
precondition(!ranges.isEmpty, "The tensor range collection cannot be empty.")
1926-
precondition(ranges.count { $0 == TensorRange.ellipsis } < 2,
1926+
precondition(ranges.count(where: { $0 == TensorRange.ellipsis }) < 2,
19271927
"Only one ellipsis is allowed per tensor range collection.")
19281928

19291929
var begin = [Int32](repeating: 0, count: ranges.count)

0 commit comments

Comments
 (0)