SavedModelBundle.Exporter
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
상속된 메서드
java.lang.Object 클래스에서 부울 | 같음 (개체 arg0) |
마지막 수업<?> | getClass () |
정수 | 해시 코드 () |
최종 무효 | 알림 () |
최종 무효 | 통지모두 () |
끈 | toString () |
최종 무효 | 대기 (long arg0, int arg1) |
최종 무효 | 기다리세요 (긴 arg0) |
최종 무효 | 기다리다 () |
공개 방법
공개 무효 내보내기 ()
던지기
IO예외 | 저장된 모델이나 변수 상태를 디스크에 쓸 수 없는 경우 |
---|
이 모델의 구체적인 기능을 저장합니다.
구체적인 함수는 서명(예: 그래프에 대한 사용자 친화적인 입력 및 출력 이름 목록)과 모델에 저장될 그래프에 대한 유효한 세션을 전달합니다.
참고: 결국 TensorFlow for Java는 Python API와 같은 함수 개체 내보내기를 지원하지만 현재는 세션 중심 모델만 지원됩니다(예: 단일 기본 그래프와 하나 이상의 서명이 있는 모델). 이러한 모델은 TensorFlow 1.x 또는 TensorFlow 2.x 추정기에 의해 내보낸 모델과 호환됩니다.
따라서 모델에 내보낸 모든 함수는 현재 동일한 세션을 공유해야 합니다. 그렇지 않으면 예외가 발생합니다.
매개변수
기능 | 저장할 그래프에 서명과 유효한 세션을 전달하는 함수 |
---|
던지기
IllegalArgumentException | 동일한 이름의 기능이 이미 모델에 추가된 경우 |
---|
지원되지 않는 작업예외 | 이 함수가 이 모델에 추가된 다른 함수와 동일한 세션을 공유하지 않는 경우 |
---|
저장할 저장된 모델의 특정 그래프를 식별하는 태그 세트를 설정합니다.
현재 이 API를 사용하면 모델당 하나의 그래프만 저장할 수 있습니다.
매개변수
태그 | 저장할 특정 MetaGraphDef를 식별하는 태그입니다. |
---|
던지기
IllegalArgumentException | 태그가 잘못된 경우 |
---|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# SavedModelBundle.Exporter\n\npublic static final class **SavedModelBundle.Exporter** \nOptions for exporting a SavedModel. \n\n### Public Methods\n\n|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| void | [export](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter#export())() Save the model into the export directory. |\n| [SavedModelBundle.Exporter](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter) | [withFunction](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter#withFunction(org.tensorflow.ConcreteFunction))([ConcreteFunction](/jvm/api_docs/java/org/tensorflow/ConcreteFunction) function) Save a concrete function of this model. |\n| [SavedModelBundle.Exporter](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter) | [withTags](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter#withTags(java.lang.String...))(String... tags) Sets the set of tags that identify the specific graph in the saved model to save. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public void\n**export**\n()\n\nSave the model into the export directory. \n\n##### Throws\n\n| IOException | if saved model or variable state cannot be written on disk |\n|-------------|------------------------------------------------------------|\n\n#### public [SavedModelBundle.Exporter](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter)\n**withFunction**\n([ConcreteFunction](/jvm/api_docs/java/org/tensorflow/ConcreteFunction) function)\n\nSave a concrete function of this model.\n\nThe concrete function carries a signature (i.e. a list of user-friendly input and outputs\nnames to a graph) and a valid session to a graph to be saved in the model.\n\n*Note:Eventually, TensorFlow for Java will support the export of functions objects like\nthe Python API does but right now, only session-centric models are supported (i.e. models that\nhas a single main graph and one or more signatures). These models are compatible with those\nexported by TensorFlow 1.x or by TensorFlow 2.x estimators.\n\u003cbr /\u003e\nTherefore, all functions exported in a model should share the same session at the moment\nor an exception will be thrown.*\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| function | a function carrying a signature and a valid session to the graph to be saved |\n|----------|------------------------------------------------------------------------------|\n\n##### Returns\n\n- this object \n\n##### Throws\n\n| IllegalArgumentException | if a function with the same name has already been added to the model |\n| UnsupportedOperationException | if this function does not share the same session with the other functions added to this model |\n|-------------------------------|-----------------------------------------------------------------------------------------------|\n\n#### public [SavedModelBundle.Exporter](/jvm/api_docs/java/org/tensorflow/SavedModelBundle.Exporter)\n**withTags**\n(String... tags)\n\nSets the set of tags that identify the specific graph in the saved model to save.\n\nNote that only one graph per model can be saved right now using this API.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| tags | the tags identifying the specific MetaGraphDef to save. |\n|------|---------------------------------------------------------|\n\n##### Returns\n\n- this object \n\n##### Throws\n\n| IllegalArgumentException | if tags are invalid |\n|--------------------------|---------------------|"]]