TensorFlow 2.0 Beta is available Learn more

tf.contrib.rnn.InputProjectionWrapper

Class InputProjectionWrapper

Operator adding an input projection to the given cell.

Inherits From: RNNCell

Defined in contrib/rnn/python/ops/core_rnn_cell.py.

__init__

__init__(
    cell,
    num_proj,
    activation=None,
    input_size=None,
    reuse=None
)

Create a cell with input projection.

Args:

  • cell: an RNNCell, a projection of inputs is added before it.
  • num_proj: Python integer. The dimension to project to.
  • activation: (optional) an optional activation function.
  • input_size: Deprecated and unused.
  • 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.

Properties

graph

DEPRECATED FUNCTION

output_size

scope_name

state_size

Methods

get_initial_state

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

zero_state

zero_state(
    batch_size,
    dtype
)