aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/java/src/test
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-27 15:07:12 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-27 15:11:54 -0700
commit8276ef6088ecedd4a5f62a8eacd35a075a43746c (patch)
tree62a052e911f2d8921d8beabe011833f03da0102d /tensorflow/contrib/lite/java/src/test
parentd0397c3314600da0c9cdc300ae87483331d54298 (diff)
Updates Interpreter to be initialized with a MappedByteBuffer for backward compatibility.
PiperOrigin-RevId: 214843130
Diffstat (limited to 'tensorflow/contrib/lite/java/src/test')
-rw-r--r--tensorflow/contrib/lite/java/src/test/java/org/tensorflow/lite/InterpreterTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/java/src/test/java/org/tensorflow/lite/InterpreterTest.java b/tensorflow/contrib/lite/java/src/test/java/org/tensorflow/lite/InterpreterTest.java
index fdd5063156..a98fca0132 100644
--- a/tensorflow/contrib/lite/java/src/test/java/org/tensorflow/lite/InterpreterTest.java
+++ b/tensorflow/contrib/lite/java/src/test/java/org/tensorflow/lite/InterpreterTest.java
@@ -71,7 +71,7 @@ public final class InterpreterTest {
Path path = MODEL_FILE.toPath();
FileChannel fileChannel =
(FileChannel) Files.newByteChannel(path, EnumSet.of(StandardOpenOption.READ));
- MappedByteBuffer mappedByteBuffer =
+ ByteBuffer mappedByteBuffer =
fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fileChannel.size());
Interpreter interpreter = new Interpreter(mappedByteBuffer);
float[] oneD = {1.23f, 6.54f, 7.81f};
@@ -118,7 +118,7 @@ public final class InterpreterTest {
byteBuffer.order(ByteOrder.nativeOrder());
fileChannel.read(byteBuffer);
try {
- Interpreter interpreter = new Interpreter(byteBuffer);
+ new Interpreter(byteBuffer);
fail();
} catch (IllegalArgumentException e) {
assertThat(e)