From bcbe9c76fe6d6e69a00b5792458d5595bc480df7 Mon Sep 17 00:00:00 2001 From: Nupur Garg Date: Sat, 16 Feb 2019 11:40:21 -0800 Subject: [PATCH] Added clarification in interpreter.py documentation. PiperOrigin-RevId: 234310063 --- tensorflow/lite/python/interpreter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tensorflow/lite/python/interpreter.py b/tensorflow/lite/python/interpreter.py index a1325f0b1ff..9b9516f6d0b 100644 --- a/tensorflow/lite/python/interpreter.py +++ b/tensorflow/lite/python/interpreter.py @@ -216,7 +216,8 @@ class Interpreter(object): def get_tensor(self, tensor_index): """Gets the value of the input tensor (get a copy). - If you wish to avoid the copy, use `tensor()`. + If you wish to avoid the copy, use `tensor()`. This function cannot be used + to read intermediate results. Args: tensor_index: Tensor index of tensor to get. This value can be gotten from @@ -233,7 +234,8 @@ class Interpreter(object): This allows reading and writing to this tensors w/o copies. This more closely mirrors the C++ Interpreter class interface's tensor() member, hence the name. Be careful to not hold these output references through calls - to `allocate_tensors()` and `invoke()`. + to `allocate_tensors()` and `invoke()`. This function cannot be used to read + intermediate results. Usage: