Skip to content

RHNCell throws ValueError during application #18

@tastyminerals

Description

@tastyminerals

When I attempt to use RHNCell it throws:

ValueError: Dimensions must be equal, but are 50 and 100 for 'Train/Model/recurrent_loop/recurrent_loop/multi_rnn_cell/cell_0/h_0/mul' (op: 'Mul') with input shapes: [32,50], [100]

The cell is initialized the following way.

hidden_size = 100
input_size=50
cell = RHNCell(hidden_size, input_size, is_training=True, depth=3, forget_bias=None)

and applied in a loop:

for batch in batches:
    # batch = [32, 50]
    output, state = cell(batch, state)

Both LSTMCell and GRUCell work with the above input and hidden sizes. Why doesn't RHNCell?
Setting the input_size to 100 throws another error: ValueError: Linear is expecting 2D arguments: [[32, 100], [100]].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions