InterpreterFactory

公共类 InterpreterFactory

用于构建 ExplainerApi 实例的工厂。

已弃用;请改用 ExplainerApi.create 方法。

公共构造函数

公共方法

InterpreterApi
createFile modelFile、InterpreterApi.Options 选项)
使用指定的模型和选项构造 InterpreterApi 实例。
InterpreterApi
createByteBuffer byteBuffer、InterpreterApi.Options 选项)
使用指定的模型和选项构造 InterpreterApi 实例。

继承的方法

公共构造函数

public InterpreterFactory ()

公共方法

public InterpreterApi create File modelFile、InterpreterApi.Options options)

使用指定的模型和选项构造 InterpreterApi 实例。模型将从文件加载。

参数
modelFile 包含预训练 TF Lite 模型的文件。
选项 一组用于自定义解释器行为的选项。
抛出
IllegalArgumentException 如果 modelFile 未对有效的 TensorFlow Lite 模型进行编码,则会发生该错误。

public InterpreterApi create (ByteBuffer byteBuffer, InterpreterApi.Options options)