# CudnnRNNCanonicalToParamsV2

public final class **CudnnRNNCanonicalToParamsV2** Converts CudnnRNN params from canonical form to usable form. It supports the projection in LSTM.


Writes a set of weights into the opaque params buffer so they can be used in
upcoming training or inferences.


Note that the params buffer may not be compatible across different GPUs. So any
save and restoration should be converted to and from the canonical weights and
biases.


num_layers: Specifies the number of layers in the RNN model.
num_units: Specifies the size of the hidden state.
input_size: Specifies the size of the input state.
weights: the canonical form of weights that can be used for saving
and restoration. They are more likely to be compatible across different
generations.
biases: the canonical form of biases that can be used for saving
and restoration. They are more likely to be compatible across different
generations.
num_params_weights: number of weight parameter matrix for all layers.
num_params_biases: number of bias parameter vector for all layers.
rnn_mode: Indicates the type of the RNN model.
input_mode: Indicate whether there is a linear projection between the input and
The actual computation before the first layer. 'skip_input' is only allowed
when input_size == num_units; 'auto_select' implies 'skip_input' when
input_size == num_units; otherwise, it implies 'linear_input'.
direction: Indicates whether a bidirectional model will be used.
dir = (direction == bidirectional) ? 2 : 1
dropout: dropout probability. When set to 0., dropout is disabled.
seed: the 1st part of a seed to initialize dropout.
seed2: the 2nd part of a seed to initialize dropout.
num_proj: The output dimensionality for the projection matrices. If None or 0,
no projection is performed.

<br />

<br />

<br />

### Nested Classes

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

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#asOutput())() Returns the symbolic handle of a tensor. |
| static \<T extends Number\> [CudnnRNNCanonicalToParamsV2](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2)\<T\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<java.lang.Integer>,%20org.tensorflow.Operand<java.lang.Integer>,%20org.tensorflow.Operand<java.lang.Integer>,%20java.lang.Iterable<org.tensorflow.Operand<T>>,%20java.lang.Iterable<org.tensorflow.Operand<T>>,%20org.tensorflow.op.core.CudnnRNNCanonicalToParamsV2.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)\<Integer\> numLayers, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> numUnits, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> inputSize, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\>\> weights, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\>\> biases, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) options) Factory method to create a class wrapping a new CudnnRNNCanonicalToParamsV2 operation. |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [direction](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#direction(java.lang.String))(String direction) |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [dropout](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#dropout(java.lang.Float))(Float dropout) |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [inputMode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#inputMode(java.lang.String))(String inputMode) |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [numProj](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#numProj(java.lang.Long))(Long numProj) |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [params](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#params())() |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [rnnMode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#rnnMode(java.lang.String))(String rnnMode) |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [seed](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#seed(java.lang.Long))(Long seed) |
| static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) | [seed2](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2#seed2(java.lang.Long))(Long seed2) |

### 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)\<T\> | [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)\<T\>
**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 [CudnnRNNCanonicalToParamsV2](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2)\<T\>
**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)\<Integer\> numLayers, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> numUnits, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> inputSize, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\>\> weights, Iterable\<[Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\>\> biases, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options) options)

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

##### Parameters

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

##### Returns

- a new instance of CudnnRNNCanonicalToParamsV2

#### public static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options)
**direction**
(String direction)

<br />

#### public static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options)
**dropout**
(Float dropout)

<br />

#### public static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options)
**inputMode**
(String inputMode)

<br />

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

<br />

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

<br />

#### public static [CudnnRNNCanonicalToParamsV2.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/CudnnRNNCanonicalToParamsV2.Options)
**rnnMode**
(String rnnMode)

<br />

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

<br />

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

<br />