Conozca lo último en aprendizaje automático, IA generativa y más en el
Simposio WiML 2023.
GraphOperation
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Implementación para una Operation
agregada como nodo a un Graph
.
Las instancias de GraphOperation son válidas solo mientras el Graph
del que forman parte sea válido. Por lo tanto, si se ha invocado Graph.close()
, los métodos en la instancia de GraphOperation pueden fallar con una IllegalStateException
.
Las instancias de GraphOperation son inmutables y seguras para subprocesos.
Métodos públicos
booleano | |
En t | |
En t | inputListLength (nombre de cadena) Devuelve el tamaño de la lista de entradas dada de tensores para esta operación. |
Cuerda | nombre () Devuelve el nombre completo de la Operación. |
En t | númSalidas () Devuelve el número de tensores producidos por esta operación. |
<T> Salida <T> | salida (int idx) Devuelve un identificador simbólico a uno de los tensores producidos por esta operación. |
Salida[] <?> | salidaLista (int idx, int longitud) Devuelve identificadores simbólicos a una lista de tensores producidos por esta operación. |
En t | outputListLength (nombre de cadena) Devuelve el tamaño de la lista de Tensores producidos por esta operación. |
Cuerda | |
Cuerda | tipo () Devuelve el tipo de operación, es decir, el nombre del cálculo realizado por la operación. |
Métodos Heredados
De la clase java.lang.Object booleano | es igual a (Objeto arg0) |
clase final<?> | obtenerClase () |
En t | código hash () |
vacío final | notificar () |
vacío final | notificar a todos () |
Cuerda | a la cadena () |
vacío final | espera (largo arg0, int arg1) |
vacío final | espera (largo arg0) |
vacío final | espera () |
Desde la interfaz org.tensorflow.Operation abstracto int | inputListLength (nombre de cadena) Devuelve el tamaño de la lista de entradas dada de tensores para esta operación. |
cadena abstracta | nombre () Devuelve el nombre completo de la Operación. |
abstracto int | númSalidas () Devuelve el número de tensores producidos por esta operación. |
Resumen <T> Salida <T> | salida (int idx) Devuelve un identificador simbólico a uno de los tensores producidos por esta operación. |
Salida abstracta[] <?> | salidaLista (int idx, int longitud) Devuelve identificadores simbólicos a una lista de tensores producidos por esta operación. |
abstracto int | outputListLength (nombre de cadena) Devuelve el tamaño de la lista de Tensores producidos por esta operación. |
cadena abstracta | tipo () Devuelve el tipo de operación, es decir, el nombre del cálculo realizado por la operación. |
Métodos públicos
public boolean equals (Objeto o)
código hash público int ()
Devuelve el tamaño de la lista de entradas dada de tensores para esta operación.
Una operación tiene múltiples entradas con nombre, cada una de las cuales contiene un solo tensor o una lista de tensores. Este método devuelve el tamaño de la lista de tensores para una entrada con nombre específico de la operación.
Parámetros
nombre | identificador de la lista de tensores (de los cuales puede haber muchos) entradas a esta operación. |
---|
Devoluciones
- el tamaño de la lista de tensores producidos por esta entrada con nombre.
Nombre de cadena pública ()
Devuelve el nombre completo de la Operación.
public int numSalidas ()
Devuelve el número de tensores producidos por esta operación.
Salida pública <T> salida (int idx)
Devuelve un identificador simbólico a uno de los tensores producidos por esta operación.
Advertencia: no comprueba que el tipo del tensor coincida con T. Se recomienda llamar a este método con un parámetro de tipo explícito en lugar de dejar que se infiera, por ejemplo, operation.<Integer>output(0)
Parámetros
idx | El índice de la salida entre las salidas producidas por esta operación. |
---|
public Output[] <?> lista de salida (int idx, int longitud)
Devuelve identificadores simbólicos a una lista de tensores producidos por esta operación.
Parámetros
idx | índice del primer tensor de la lista |
---|
largo | número de tensores en la lista |
---|
public int outputListLength (nombre de cadena)
Devuelve el tamaño de la lista de Tensores producidos por esta operación.
Una operación tiene varias salidas con nombre, cada una de las cuales produce un solo tensor o una lista de tensores. Este método devuelve el tamaño de la lista de tensores para una salida con nombre específico de la operación.
Parámetros
nombre | identificador de la lista de tensores (de los cuales puede haber muchos) producidos por esta operación. |
---|
Devoluciones
- el tamaño de la lista de tensores producidos por esta salida con nombre.
Cadena pública a Cadena ( )
Tipo de cadena pública ()
Devuelve el tipo de operación, es decir, el nombre del cálculo realizado por la operación.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados. Cierto contenido está sujeto a la licencia de NumPy.
Última actualización: 2023-10-06 (UTC)
[null,null,["Última actualización: 2023-10-06 (UTC)"],[],[],null,["# GraphOperation\n\npublic final class **GraphOperation** \nImplementation for an [Operation](/versions/r2.13/api_docs/java/org/tensorflow/Operation) added as a node to a [Graph](/versions/r2.13/api_docs/java/org/tensorflow/Graph).\n\nGraphOperation instances are valid only as long as the [Graph](/versions/r2.13/api_docs/java/org/tensorflow/Graph) they are a part of is\nvalid. Thus, if [Graph.close()](/versions/r2.13/api_docs/java/org/tensorflow/Graph#close()) has been invoked, then methods on the GraphOperation\ninstance may fail with an `IllegalStateException`.\n\nGraphOperation instances are immutable and thread-safe.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Public Methods\n\n|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#equals(java.lang.Object))(Object o) |\n| int | [hashCode](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#hashCode())() |\n| int | [inputListLength](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#inputListLength(java.lang.String))(String name) Returns the size of the given inputs list of Tensors for this operation. |\n| String | [name](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#name())() Returns the full name of the Operation. |\n| int | [numOutputs](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#numOutputs())() Returns the number of tensors produced by this operation. |\n| \\\u003cT\\\u003e [Output](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e | [output](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#output(int))(int idx) Returns a symbolic handle to one of the tensors produced by this operation. |\n| [Output\\[\\]](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e | [outputList](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#outputList(int,%20int))(int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| int | [outputListLength](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#outputListLength(java.lang.String))(String name) Returns the size of the list of Tensors produced by this operation. |\n| String | [toString](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#toString())() |\n| String | [type](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation#type())() Returns the type of the operation, i.e., the name of the computation performed by the operation. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface [org.tensorflow.Operation](/versions/r2.13/api_docs/java/org/tensorflow/Operation) \n\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [inputListLength](/versions/r2.13/api_docs/java/org/tensorflow/Operation#inputListLength(java.lang.String))(String name) Returns the size of the given inputs list of Tensors for this operation. |\n| abstract String | [name](/versions/r2.13/api_docs/java/org/tensorflow/Operation#name())() Returns the full name of the Operation. |\n| abstract int | [numOutputs](/versions/r2.13/api_docs/java/org/tensorflow/Operation#numOutputs())() Returns the number of tensors produced by this operation. |\n| abstract \\\u003cT\\\u003e [Output](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e | [output](/versions/r2.13/api_docs/java/org/tensorflow/Operation#output(int))(int idx) Returns a symbolic handle to one of the tensors produced by this operation. |\n| abstract [Output\\[\\]](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e | [outputList](/versions/r2.13/api_docs/java/org/tensorflow/Operation#outputList(int,%20int))(int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| abstract int | [outputListLength](/versions/r2.13/api_docs/java/org/tensorflow/Operation#outputListLength(java.lang.String))(String name) Returns the size of the list of Tensors produced by this operation. |\n| abstract String | [type](/versions/r2.13/api_docs/java/org/tensorflow/Operation#type())() Returns the type of the operation, i.e., the name of the computation performed by the operation. |\n\nPublic Methods\n--------------\n\n#### public boolean\n**equals**\n(Object o)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| o | |\n|---|---|\n\n#### public int\n**hashCode**\n()\n\n\u003cbr /\u003e\n\n#### public int\n**inputListLength**\n(String name)\n\nReturns the size of the given inputs list of Tensors for this operation.\n\nAn Operation has multiple named inputs, each of which contains either a single tensor or a\nlist of tensors. This method returns the size of the list of tensors for a specific named input\nof the operation.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| name | identifier of the list of tensors (of which there may be many) inputs to this operation. |\n|------|------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- the size of the list of Tensors produced by this named input. \n\n#### public String\n**name**\n()\n\nReturns the full name of the Operation. \n\n#### public int\n**numOutputs**\n()\n\nReturns the number of tensors produced by this operation. \n\n#### public [Output](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e\n**output**\n(int idx)\n\nReturns a symbolic handle to one of the tensors produced by this operation.\n\nWarning: Does not check that the type of the tensor matches T. It is recommended to call\nthis method with an explicit type parameter rather than letting it be inferred, e.g. `operation.<Integer>output(0)`\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| idx | The index of the output among the outputs produced by this operation. |\n|-----|-----------------------------------------------------------------------|\n\n#### public [Output\\[\\]](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e\n**outputList**\n(int idx, int length)\n\nReturns symbolic handles to a list of tensors produced by this operation. \n\n##### Parameters\n\n| idx | index of the first tensor of the list |\n| length | number of tensors in the list |\n|--------|---------------------------------------|\n\n##### Returns\n\n- array of `Output` \n\n#### public int\n**outputListLength**\n(String name)\n\nReturns the size of the list of Tensors produced by this operation.\n\nAn Operation has multiple named outputs, each of which produces either a single tensor or a\nlist of tensors. This method returns the size of the list of tensors for a specific named\noutput of the operation.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| name | identifier of the list of tensors (of which there may be many) produced by this operation. |\n|------|--------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- the size of the list of Tensors produced by this named output. \n\n#### public String\n**toString**\n()\n\n\u003cbr /\u003e\n\n#### public String\n**type**\n()\n\nReturns the type of the operation, i.e., the name of the computation performed by the\noperation."]]