TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.rnn.OutputProjectionWrapper

View source on GitHub

Class OutputProjectionWrapper

Operator adding an output projection to the given cell.

Inherits From: RNNCell

__init__

View source

__init__(
    cell,
    output_size,
    activation=None,
    reuse=None
)

Create a cell with output projection.

Args:

  • cell: an RNNCell, a projection to output_size is added to it.
  • output_size: integer, the size of the output after projection.
  • activation: (optional) an optional activation function.
  • reuse: (optional) Python boolean describing whether to reuse variables in an existing scope. If not True, and the existing scope already has the given variables, an error is raised.

Raises:

  • TypeError: if cell is not an RNNCell.
  • ValueError: if output_size is not positive.

Properties

graph

DEPRECATED FUNCTION

output_size

scope_name

state_size

Methods

get_initial_state

View source

get_initial_state(
    inputs=None,
    batch_size=None,
    dtype=None
)

zero_state

View source

zero_state(
    batch_size,
    dtype
)