ExecutionEnvironment
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Sottoclassi indirette conosciute EagerSession | Un ambiente per eseguire con entusiasmo le operazioni TensorFlow. | Grafico | Un grafico del flusso di dati che rappresenta un calcolo TensorFlow. |
|
Definisce un ambiente per la creazione e l'esecuzione delle Operation
TensorFlow.
Metodi pubblici
vuoto astratto | checkInput (ingresso Op ) Verifica che input sia valido per l'utilizzo come input in questo ambiente di esecuzione. |
astratto ExecutionEnvironment.Types | tipoambiente () Ottieni il tipo di questo ambiente (dall'enumerazione "Environments". |
booleano astratto | |
booleano astratto | |
booleano astratto | isOpEnabled (stringa opType) Restituisce vero se l'operazione specificata è valida in questo ambiente di esecuzione. |
astratto OperationBuilder | opBuilder (tipo di stringa, nome di stringa) Restituisce un builder per creare una nuova Operation . |
Metodi pubblici
Verifica che input
sia valido per l'utilizzo come input in questo ambiente di esecuzione. In caso contrario, genera IllegalArgumentException
.
Parametri
ingresso | L'operazione da verificare |
---|
Lancia
IllegalArgumentException | se l'input non può essere utilizzato come input in questo ambiente di esecuzione. |
---|
Ottieni il tipo di questo ambiente (dall'enumerazione "Environments".
ritorna
- Un valore "Ambienti" che indica il tipo di ambiente di esecuzione.
isEager pubblico astratto booleano ()
isGraph booleano astratto pubblico ()
isOpEnabled booleano astratto pubblico (String opType)
Restituisce vero se l'operazione specificata è valida in questo ambiente di esecuzione.
Parametri
opType | L'operazione da verificare. |
---|
ritorna
- Se l'operazione specificata è valida in questo ambiente di esecuzione.
public abstract OperationBuilder opBuilder (tipo stringa, nome stringa)
Restituisce un builder per creare una nuova Operation
.
Parametri
tipo | dell’Operazione (ovvero, identifica il calcolo da eseguire) |
---|
nome | per fare riferimento all'operazione creata nell'ambito di questo ambiente. |
---|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[null,null,["Ultimo aggiornamento 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."]]