MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / invoke

Method invoke

tensorflow/lite/python/interpreter.py:440–453  ·  view source on GitHub ↗

Invoke the interpreter. Be sure to set the input sizes, allocate tensors and fill values before calling this. Also, note that this function releases the GIL so heavy computation can be done in the background while the Python interpreter continues. No other function on this object sh

(self)

Source from the content-addressed store, hash-verified

438 return lambda: self._interpreter.tensor(self._interpreter, tensor_index)
439
440 def invoke(self):
441 """Invoke the interpreter.
442
443 Be sure to set the input sizes, allocate tensors and fill values before
444 calling this. Also, note that this function releases the GIL so heavy
445 computation can be done in the background while the Python interpreter
446 continues. No other function on this object should be called while the
447 invoke() call has not finished.
448
449 Raises:
450 ValueError: When the underlying interpreter fails raise ValueError.
451 """
452 self._ensure_safe()
453 self._interpreter.Invoke()
454
455 def reset_all_variables(self):
456 return self._interpreter.ResetVariableTensors()

Callers 15

testScalarValidMethod · 0.95
_evaluateTFLiteModelMethod · 0.95
testScalarValidMethod · 0.95
testSequentialModelMethod · 0.95
testCustomLayerMethod · 0.95
testFunctionalModelMethod · 0.95
testFloatMethod · 0.95
testUint8Method · 0.95
testStringMethod · 0.95

Calls 2

_ensure_safeMethod · 0.95
InvokeMethod · 0.45

Tested by 15

testScalarValidMethod · 0.76
_evaluateTFLiteModelMethod · 0.76
testScalarValidMethod · 0.76
testSequentialModelMethod · 0.76
testCustomLayerMethod · 0.76
testFunctionalModelMethod · 0.76
testFloatMethod · 0.76
testUint8Method · 0.76
testStringMethod · 0.76