herkese açık arayüz
InterpreterApi
Bilinen Dolaylı Alt Sınıflar |
Deneysel yöntemler hariç TensorFlow Lite model yorumlayıcısı arayüzü.
InterpreterApi
örneği, önceden eğitilmiş bir TensorFlow Lite modelini içerir.
işlemleri model çıkarımı için yürütülür.
Örneğin, bir model yalnızca bir giriş alır ve yalnızca bir çıkış döndürürse:
try (InterpreterApi interpreter =
new InterpreterApi.create(file_of_a_tensorflowlite_model)) {
interpreter.run(input, output);
}
Bir model birden fazla giriş veya çıkış alıyorsa:
Object[] inputs = {input0, input1, ...};
Map<Integer, Object> map_of_indices_to_outputs = new HashMap<>();
FloatBuffer ith_output = FloatBuffer.allocateDirect(3 * 2 * 4); // Float tensor, shape 3x2x4.
ith_output.