Skip to content

Commit dc9fcb4

Browse files
ksasidan-zheng
authored andcommitted
---
yaml --- r: 312319 b: refs/heads/tensorflow-merge c: 0c45261 h: refs/heads/master i: 312317: 9b90a11 312315: f8c7173 312311: 295240a 312303: c665280 312287: 21577de 312255: 0044509 312191: d167e99 312063: 25ec2b6 311807: d8613e9 311295: 881526f
1 parent 16d33e6 commit dc9fcb4

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ refs/heads/chase-my-tail: 8bb91443a9e81bbfac92a2621a0af887a1da8dbf
13791379
refs/heads/consider-outer-alternatives: 708bac749ec60a22a79e2eefbe734f9488a7370d
13801380
refs/heads/revert-25740-oops-i-linked-it-again: fdd41aeb682fc488572bdc1cf71b2ff6997ba576
13811381
refs/heads/swift-5.1-branch-06-12-2019: e63b7b2d3b93c48232d386099d0ec525d21d8f8d
1382-
refs/heads/tensorflow-merge: 716575e97ee087c76c78ea5adf1a2ca541baad71
1382+
refs/heads/tensorflow-merge: 0c452616820bfbc4f3197dd418c74adadc830b5c
13831383
refs/heads/update-checkout-sha-info: 5832743c5c2a842976c42a508a4c6dcceefb0aef
13841384
refs/tags/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-12-a: 228f0448d9bb909aacbba4afcb7c600a405d15da
13851385
refs/tags/swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-14-a: 922861a77b5fc2bf46bc917da70ceb15eef76836

branches/tensorflow-merge/stdlib/public/TensorFlow/TensorShape.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,9 @@ extension TensorShape : Codable {
159159
self.init(dimensions)
160160
}
161161
}
162+
163+
extension TensorShape : CustomStringConvertible {
164+
public var description: String {
165+
return dimensions.description
166+
}
167+
}

branches/tensorflow-merge/test/TensorFlowRuntime/tensor.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,11 @@ TensorTests.testAllBackends("SimpleCond") {
623623
expectEqual(0, selectValue(true).scalar)
624624
}
625625

626+
TensorTests.testAllBackends("TensorShapeDescription") {
627+
expectEqual("[2, 2]", Tensor<Int32>(ones: [2, 2]).shape.description)
628+
expectEqual("[]", Tensor(1).shape.description)
629+
}
630+
626631
@inline(never)
627632
func testXORInference() {
628633
func xor(_ x: Float, _ y: Float) -> Float {

0 commit comments

Comments
 (0)