Skip to content

Commit 8773ccc

Browse files
committed
Rebase on master
1 parent 88e9a21 commit 8773ccc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/DeviceSpecTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public void withDeviceMethod() {
5353
.abs(aOps)
5454
.asOutput();
5555

56-
try (AutoCloseableList<Tensor<?>> t =
56+
try (AutoCloseableList<Tensor> t =
5757
new AutoCloseableList<>(session.runner().fetch(absOps).run())) {
58-
assertEquals(1, t.get(0).rawData().asInts().getObject(0));
58+
assertEquals(1, ((TInt32)t.get(0)).getInt());
5959
}
6060
}
6161
}
@@ -85,9 +85,9 @@ public void withEmptyDeviceSpec() {
8585
.abs(aOps)
8686
.asOutput();
8787

88-
try (AutoCloseableList<Tensor<?>> t =
88+
try (AutoCloseableList<Tensor> t =
8989
new AutoCloseableList<>(session.runner().fetch(absOps).run())) {
90-
assertEquals(1, t.get(0).rawData().asInts().getObject(0));
90+
assertEquals(1, ((TInt32)t.get(0)).getInt());
9191
}
9292
}
9393
}
@@ -131,9 +131,9 @@ public void withTwoScopes() {
131131
.mul(absOps, bOps)
132132
.asOutput();
133133

134-
try (AutoCloseableList<Tensor<?>> t =
134+
try (AutoCloseableList<Tensor> t =
135135
new AutoCloseableList<>(session.runner().fetch(mulOps).run())) {
136-
assertEquals(10, t.get(0).rawData().asInts().getObject(0));
136+
assertEquals(10, ((TInt32)t.get(0)).getInt());
137137
}
138138
}
139139
}
@@ -179,7 +179,7 @@ public void withIncorrectDeviceSpec() {
179179
.mul(absOps, bOps)
180180
.asOutput();
181181

182-
try (AutoCloseableList<Tensor<?>> t =
182+
try (AutoCloseableList<Tensor> t =
183183
new AutoCloseableList<>(session.runner().fetch(mulOps).run())) {
184184
fail();
185185
} catch (TFInvalidArgumentException e) {
@@ -212,9 +212,9 @@ public void withDeviceSpecInScope() {
212212
.abs(aOps)
213213
.asOutput();
214214

215-
try (AutoCloseableList<Tensor<?>> t =
215+
try (AutoCloseableList<Tensor> t =
216216
new AutoCloseableList<>(session.runner().fetch(absOps).run())) {
217-
assertEquals(1, t.get(0).rawData().asInts().getObject(0));
217+
assertEquals(1, ((TInt32)t.get(0)).getInt());
218218
}
219219
}
220220
}

0 commit comments

Comments
 (0)