org.tensorflow
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
کلاس هایی را برای ساخت، ذخیره، بارگذاری و اجرای مدل های TensorFlow تعریف می کند.
هشدار : API در حال حاضر آزمایشی است و تحت ضمانتهای ثبات API TensorFlow نیست. برای دستورالعملهای نصب به README.md مراجعه کنید.
مثال LabelImage استفاده از این API را برای طبقه بندی تصاویر با استفاده از یک شبکه عصبی کانولوشنال معماری Inception از پیش آموزش دیده را نشان می دهد. نشان می دهد:
- ساخت گراف: با استفاده از کلاس OperationBuilder برای ساخت یک نمودار برای رمزگشایی، تغییر اندازه و عادی سازی یک تصویر JPEG.
- بارگذاری مدل: استفاده از Graph.importGraphDef() برای بارگذاری یک مدل Inception از قبل آموزش دیده.
- اجرای نمودار: استفاده از Session برای اجرای نمودارها و یافتن بهترین برچسب برای یک تصویر.
رابط ها
محیط اجرا | محیطی را برای ایجاد و اجرای TensorFlow Operation s تعریف می کند. |
Graph.WhileSubgraphBuilder | برای نمونه سازی یک کلاس انتزاعی استفاده می شود که روش buildSubgraph را نادیده می گیرد تا یک زیرگراف شرطی یا بدنه برای مدتی حلقه ایجاد کند. |
عملوند <T> | رابط پیاده سازی شده توسط عملوندهای یک عملیات TensorFlow. |
عمل | محاسبات را روی تانسورها انجام می دهد. |
OperationBuilder | سازنده برای Operation s. |
کلاس ها
Enums
استثناها
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی."],[],[],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. |"]]