지정된 모델과 옵션을 사용하여 InterpreterApi 인스턴스를 생성합니다. 모델은 ByteBuffer에서 읽습니다.
매개변수
byteBuffer
바이너리 직렬화 형식으로 선행 학습된 TF Lite 모델입니다. InterpreterApi 인스턴스를 생성한 후에는 ByteBuffer를 수정하면 안 됩니다. ByteBuffer는 모델 파일을 메모리 매핑하는 MappedByteBuffer이거나 모델의 바이트 콘텐츠를 포함하는 nativeOrder()의 직접적인 ByteBuffer일 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-24(UTC)"],[],[],null,["# InterpreterFactory\n\npublic class **InterpreterFactory** \nFactory for constructing InterpreterApi instances.\n\nDeprecated; please use the InterpreterApi.create method instead.\n\n\u003cbr /\u003e\n\n### Public Constructors\n\n|---|-----------------------------------------------------------------------------------------------------------|\n| | [InterpreterFactory](/edge/api/tflite/java/org/tensorflow/lite/InterpreterFactory#InterpreterFactory())() |\n\n### Public Methods\n\n|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) | [create](/edge/api/tflite/java/org/tensorflow/lite/InterpreterFactory#create(java.io.File,%20org.tensorflow.lite.InterpreterApi.Options))([File](https://developer.android.com/reference/java/io/File.html) modelFile, [InterpreterApi.Options](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options) options) Constructs an [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) instance, using the specified model and options. |\n| [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) | [create](/edge/api/tflite/java/org/tensorflow/lite/InterpreterFactory#create(java.nio.ByteBuffer,%20org.tensorflow.lite.InterpreterApi.Options))([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html) byteBuffer, [InterpreterApi.Options](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options) options) Constructs an [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) instance, using the specified model and options. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |\n| final [Class](https://developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public\n**InterpreterFactory**\n()\n\n\u003cbr /\u003e\n\nPublic Methods\n--------------\n\n#### public [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi)\n**create**\n([File](https://developer.android.com/reference/java/io/File.html) modelFile, [InterpreterApi.Options](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options) options)\n\nConstructs an [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) instance, using the specified model and options. The model\nwill be loaded from a file. \n\n##### Parameters\n\n| modelFile | A file containing a pre-trained TF Lite model. |\n| options | A set of options for customizing interpreter behavior. |\n|-----------|--------------------------------------------------------|\n\n##### Throws\n\n| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if `modelFile` does not encode a valid TensorFlow Lite model. |\n|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|\n\n#### public [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi)\n**create**\n([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html) byteBuffer, [InterpreterApi.Options](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi.Options) options)\n\nConstructs an [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) instance, using the specified model and options. The model\nwill be read from a `ByteBuffer`. \n\n##### Parameters\n\n| byteBuffer | A pre-trained TF Lite model, in binary serialized form. The ByteBuffer should not be modified after the construction of an [InterpreterApi](/edge/api/tflite/java/org/tensorflow/lite/InterpreterApi) instance. The `ByteBuffer` can be either a `MappedByteBuffer` that memory-maps a model file, or a direct `ByteBuffer` of nativeOrder() that contains the bytes content of a model. |\n| options | A set of options for customizing interpreter behavior. |\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Throws\n\n| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if `byteBuffer` is not a `MappedByteBuffer` nor a direct `ByteBuffer` of nativeOrder. |\n|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|"]]