# ResourceGather

public final class **ResourceGather** Gather slices from the variable pointed to by \`resource\` according to \`indices\`.


\`indices\` must be an integer tensor of any dimension (usually 0-D or 1-D).
Produces an output tensor with shape \`indices.shape + params.shape\[1:\]\` where:

    # Scalar indices
         output[:, ..., :] = params[indices, :, ... :]
     
         # Vector indices
         output[i, :, ..., :] = params[indices[i], :, ... :]
     
         # Higher rank indices
         output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]
     
<br />

<br />

### Nested Classes

|---|---|---|---|
| class | [ResourceGather.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options) || Optional attributes for `https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather` |

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather#asOutput())() Returns the symbolic handle of a tensor. |
| static [ResourceGather.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options) | [batchDims](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather#batchDims(java.lang.Long))(Long batchDims) |
| static \<U, T extends Number\> [ResourceGather](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather)\<U\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<?>,%20org.tensorflow.Operand<T>,%20java.lang.Class<U>,%20org.tensorflow.op.core.ResourceGather.Options...))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\> resource, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> indices, Class\<U\> dtype, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options) options) Factory method to create a class wrapping a new ResourceGather operation. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [output](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather#output())() |
| static [ResourceGather.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options) | [validateIndices](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather#validateIndices(java.lang.Boolean))(Boolean validateIndices) |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface [org.tensorflow.Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)

|---|---|
| abstract [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand#asOutput())() Returns the symbolic handle of a tensor. |

## Public Methods

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>
**asOutput**
()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is
used to obtain a symbolic handle that represents the computation of the input.

<br />

#### public static [ResourceGather.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options)
**batchDims**
(Long batchDims)

<br />

#### public static [ResourceGather](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather)\<U\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<?\> resource, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> indices, Class\<U\> dtype, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options) options)

Factory method to create a class wrapping a new ResourceGather operation.

##### Parameters

| scope | current scope |
| options | carries optional attributes values |
|---|---|

##### Returns

- a new instance of ResourceGather

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>
**output**
()

<br />

#### public static [ResourceGather.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/ResourceGather.Options)
**validateIndices**
(Boolean validateIndices)

<br />