ExecutionEnvironment
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תת-מחלקות עקיפות ידועות EagerSession | סביבה לביצוע פעולות TensorFlow בשקיקה. | גרָף | גרף זרימת נתונים המייצג חישוב TensorFlow. |
|
מגדיר סביבה ליצירה וביצוע של Operation
TensorFlow.
שיטות ציבוריות
זורק
חריג טיעון לא חוקי | אם לא ניתן להשתמש בקלט כקלט בסביבת ביצוע זו. |
---|
קבל את סוג הסביבה הזו (מספירת 'סביבות'.
החזרות
- ערך 'סביבות' המציין את סוג סביבת הביצוע.
תקציר ציבורי בוליאני isEager ()
תקציר ציבורי בוליאני isGraph ()
תקציר ציבורי בוליאני isOpEnabled (String opType)
מחזירה true אם הפעולה הנתונה תקפה בסביבת ביצוע זו.
החזרות
- האם הפעולה הנתונה תקפה בסביבת ביצוע זו.
תקציר ציבורי OperationBuilder opBuilder (סוג מחרוזת, שם מחרוזת)
פרמטרים
סוּג | של הפעולה (כלומר, מזהה את החישוב שיש לבצע) |
---|
שֵׁם | להתייחס להיקף הפעולה שנוצר בסביבה זו. |
---|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# ExecutionEnvironment\n\npublic interface **ExecutionEnvironment** \n\n|---|---|---|\n| Known Indirect Subclasses [EagerSession](/jvm/api_docs/java/org/tensorflow/EagerSession), [Graph](/jvm/api_docs/java/org/tensorflow/Graph) |----------------------------------------------------------------|-------------------------------------------------------------| | [EagerSession](/jvm/api_docs/java/org/tensorflow/EagerSession) | An environment for executing TensorFlow operations eagerly. | | [Graph](/jvm/api_docs/java/org/tensorflow/Graph) | A data flow graph representing a TensorFlow computation. | |||\n\nDefines an environment for creating and executing TensorFlow [Operation](/jvm/api_docs/java/org/tensorflow/Operation)s. \n\n### Nested Classes\n\n|------|---|---|---|\n| enum | [ExecutionEnvironment.Types](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment.Types) || |\n\n### Public Methods\n\n|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [checkInput](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment#checkInput(org.tensorflow.op.Op))([Op](/jvm/api_docs/java/org/tensorflow/op/Op) input) Checks that `input` is valid to use as an input in this execution environment. |\n| abstract [ExecutionEnvironment.Types](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment.Types) | [environmentType](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment#environmentType())() Get the type of this environment (from the \\`Environments\\` enumeration. |\n| abstract boolean | [isEager](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment#isEager())() |\n| abstract boolean | [isGraph](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment#isGraph())() |\n| abstract boolean | [isOpEnabled](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment#isOpEnabled(java.lang.String))(String opType) Returns true if the given operation is valid in this execution environment. |\n| abstract [OperationBuilder](/jvm/api_docs/java/org/tensorflow/OperationBuilder) | [opBuilder](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment#opBuilder(java.lang.String, java.lang.String))(String type, String name) Returns a builder to create a new [Operation](/jvm/api_docs/java/org/tensorflow/Operation). |\n\nPublic Methods\n--------------\n\n#### public abstract void\n**checkInput**\n([Op](/jvm/api_docs/java/org/tensorflow/op/Op) input)\n\nChecks that `input` is valid to use as an input in this execution environment. Throws [IllegalArgumentException](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html) if not. \n\n##### Parameters\n\n| input | The op to check |\n|-------|-----------------|\n\n##### Throws\n\n| IllegalArgumentException | if input can't be used as an input in this execution environment. |\n|--------------------------|-------------------------------------------------------------------|\n\n#### public abstract [ExecutionEnvironment.Types](/jvm/api_docs/java/org/tensorflow/ExecutionEnvironment.Types)\n**environmentType**\n()\n\nGet the type of this environment (from the \\`Environments\\` enumeration. \n\n##### Returns\n\n- An \\`Environments\\` value indicating the type of execution environment. \n\n#### public abstract boolean\n**isEager**\n()\n\n\u003cbr /\u003e\n\n#### public abstract boolean\n**isGraph**\n()\n\n\u003cbr /\u003e\n\n#### public abstract boolean\n**isOpEnabled**\n(String opType)\n\nReturns true if the given operation is valid in this execution environment. \n\n##### Parameters\n\n| opType | The op to check. |\n|--------|------------------|\n\n##### Returns\n\n- Whether the given operation is valid in this execution environment. \n\n#### public abstract [OperationBuilder](/jvm/api_docs/java/org/tensorflow/OperationBuilder)\n**opBuilder**\n(String type, String name)\n\nReturns a builder to create a new [Operation](/jvm/api_docs/java/org/tensorflow/Operation). \n\n##### Parameters\n\n| type | of the Operation (i.e., identifies the computation to be performed) |\n| name | to refer to the created Operation in this environment scope. |\n|------|---------------------------------------------------------------------|\n\n##### Returns\n\n- an [OperationBuilder](/jvm/api_docs/java/org/tensorflow/OperationBuilder) to create an Operation when [build()](/jvm/api_docs/java/org/tensorflow/OperationBuilder#build()) is invoked. If [build()](/jvm/api_docs/java/org/tensorflow/OperationBuilder#build()) is not invoked, then some resources may leak."]]