org.tensorflow
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מגדיר מחלקות לבנייה, שמירה, טעינה וביצוע של מודלים של TensorFlow.
אזהרה : ה-API הוא כרגע ניסיוני ואינו מכוסה על ידי ערבויות היציבות של TensorFlow API . ראה README.md להוראות התקנה.
הדוגמה של LabelImage מדגימה שימוש ב-API זה כדי לסווג תמונות באמצעות רשת נוירונים קונבולוציונית מיומנת מראש של ארכיטקטורת Inception . זה מדגים:
- בניית גרף: שימוש במחלקה OperationBuilder לבניית גרף לפענוח, שינוי גודל ונימול של תמונת JPEG.
- טעינת מודל: שימוש ב-Graph.importGraphDef() כדי לטעון מודל Inception מאומן מראש.
- ביצוע גרף: שימוש ב-Session כדי לבצע את הגרפים ולמצוא את התווית הטובה ביותר לתמונה.
ממשקים
שיעורים
תקצירים
חריגים
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# org.tensorflow\n\nDefines classes to build, save, load and execute TensorFlow models.\n\n**WARNING** : The API is currently experimental and is not covered by TensorFlow [API stability guarantees](https://www.tensorflow.org/guide/version_compat). See [README.md](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/java/README.md)\nfor installation instructions.\n\nThe [LabelImage](https://www.tensorflow.org/code/tensorflow/java/src/main/java/org/tensorflow/examples/LabelImage.java)\nexample demonstrates use of this API to classify images using a pre-trained [Inception](http://arxiv.org/abs/1512.00567) architecture convolutional neural network.\nIt demonstrates:\n\n- Graph construction: using the OperationBuilder class to construct a graph to decode, resize and normalize a JPEG image.\n- Model loading: Using Graph.importGraphDef() to load a pre-trained Inception model.\n- Graph execution: Using a Session to execute the graphs and find the best label for an image.\n\n### Interfaces\n\n|--------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| [ExecutionEnvironment](/api_docs/java/reference/org/tensorflow/ExecutionEnvironment) | Defines an environment for creating and executing TensorFlow [Operation](/api_docs/java/reference/org/tensorflow/Operation)s. |\n| [Graph.WhileSubgraphBuilder](/api_docs/java/reference/org/tensorflow/Graph.WhileSubgraphBuilder) | Used to instantiate an abstract class which overrides the buildSubgraph method to build a conditional or body subgraph for a while loop. |\n| [Operand](/api_docs/java/reference/org/tensorflow/Operand)\\\u003cT\\\u003e | Interface implemented by operands of a TensorFlow operation. |\n| [Operation](/api_docs/java/reference/org/tensorflow/Operation) | Performs computation on Tensors. |\n| [OperationBuilder](/api_docs/java/reference/org/tensorflow/OperationBuilder) | A builder for [Operation](/api_docs/java/reference/org/tensorflow/Operation)s. |\n\n### Classes\n\n|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [EagerSession](/api_docs/java/reference/org/tensorflow/EagerSession) | An environment for executing TensorFlow operations eagerly. |\n| [EagerSession.Options](/api_docs/java/reference/org/tensorflow/EagerSession.Options) | |\n| [Graph](/api_docs/java/reference/org/tensorflow/Graph) | A data flow graph representing a TensorFlow computation. |\n| [GraphOperation](/api_docs/java/reference/org/tensorflow/GraphOperation) | Implementation for an [Operation](/api_docs/java/reference/org/tensorflow/Operation) added as a node to a [Graph](/api_docs/java/reference/org/tensorflow/Graph). |\n| [GraphOperationBuilder](/api_docs/java/reference/org/tensorflow/GraphOperationBuilder) | An [OperationBuilder](/api_docs/java/reference/org/tensorflow/OperationBuilder) for adding [GraphOperation](/api_docs/java/reference/org/tensorflow/GraphOperation)s to a [Graph](/api_docs/java/reference/org/tensorflow/Graph). |\n| [Output](/api_docs/java/reference/org/tensorflow/Output)\\\u003cT\\\u003e | A symbolic handle to a tensor produced by an [Operation](/api_docs/java/reference/org/tensorflow/Operation). |\n| [SavedModelBundle](/api_docs/java/reference/org/tensorflow/SavedModelBundle) | SavedModelBundle represents a model loaded from storage. |\n| [SavedModelBundle.Loader](/api_docs/java/reference/org/tensorflow/SavedModelBundle.Loader) | Options for loading a SavedModel. |\n| [Server](/api_docs/java/reference/org/tensorflow/Server) | An in-process TensorFlow server, for use in distributed training. |\n| [Session](/api_docs/java/reference/org/tensorflow/Session) | Driver for [Graph](/api_docs/java/reference/org/tensorflow/Graph) execution. |\n| [Session.Run](/api_docs/java/reference/org/tensorflow/Session.Run) | Output tensors and metadata obtained when executing a session. |\n| [Session.Runner](/api_docs/java/reference/org/tensorflow/Session.Runner) | Run [Operation](/api_docs/java/reference/org/tensorflow/Operation)s and evaluate [Tensors](/api_docs/java/reference/org/tensorflow/Tensor). |\n| [Shape](/api_docs/java/reference/org/tensorflow/Shape) | The possibly partially known shape of a tensor produced by an operation. |\n| [Tensor](/api_docs/java/reference/org/tensorflow/Tensor)\\\u003cT\\\u003e | A statically typed multi-dimensional array whose elements are of a type described by T. |\n| [TensorFlow](/api_docs/java/reference/org/tensorflow/TensorFlow) | Static utility methods describing the TensorFlow runtime. |\n| [Tensors](/api_docs/java/reference/org/tensorflow/Tensors) | Type-safe factory methods for creating [Tensor](/api_docs/java/reference/org/tensorflow/Tensor) objects. |\n\n### Enums\n\n|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| [DataType](/api_docs/java/reference/org/tensorflow/DataType) | Represents the type of elements in a [Tensor](/api_docs/java/reference/org/tensorflow/Tensor) as an enum. |\n| [EagerSession.DevicePlacementPolicy](/api_docs/java/reference/org/tensorflow/EagerSession.DevicePlacementPolicy) | Controls how to act when we try to run an operation on a given device but some input tensors are not on that device. |\n| [EagerSession.ResourceCleanupStrategy](/api_docs/java/reference/org/tensorflow/EagerSession.ResourceCleanupStrategy) | Controls how TensorFlow resources are cleaned up when they are no longer needed. |\n\n### Exceptions\n\n|------------------------------------------------------------------------------------|--------------------------------------------------------------|\n| [TensorFlowException](/api_docs/java/reference/org/tensorflow/TensorFlowException) | Unchecked exception thrown when executing TensorFlow Graphs. |"]]