ExecutionEnvironment
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
EagerSession |
An environment for executing TensorFlow operations eagerly. |
Graph |
A data flow graph representing a TensorFlow computation. |
|
Defines an environment for creating and executing TensorFlow Operation
s.
Public Methods
abstract
void
|
checkInput( Op input)
Checks that input is valid to use as an input in this execution environment.
|
abstract
ExecutionEnvironment.Types
|
environmentType()
Get the type of this environment (from the `Environments` enumeration.
|
abstract
boolean
|
|
abstract
boolean
|
|
abstract
boolean
|
isOpEnabled(String opType)
Returns true if the given operation is valid in this execution environment.
|
abstract
OperationBuilder
|
|
Public Methods
Throws
IllegalArgumentException |
if input can't be used as an input in this execution environment.
|
Get the type of this environment (from the `Environments` enumeration.
Returns
- An `Environments` value indicating the type of execution environment.
public
abstract
boolean
isEager
()
public
abstract
boolean
isGraph
()
public
abstract
boolean
isOpEnabled
(String opType)
Returns true if the given operation is valid in this execution environment.
Returns
- Whether the given operation is valid in this execution environment.
public
abstract
OperationBuilder
opBuilder
(String type, String name)
Parameters
type |
of the Operation (i.e., identifies the computation to be performed) |
name |
to refer to the created Operation in this environment scope. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-11-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-29 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."]]