def forward(self, sequence):
data = self.input_block(sequence)<EOL>for idx in range(len(self.rnn_layers)):<EOL><INDENT>data, _ = self.rnn_layers[idx](data)<EOL>if self.rnn_dropout_layers:<EOL><INDENT>data = self.rnn_dropout_layers[idx](data)<EOL><DEDENT><DEDENT>if self.bidirectional:<EOL><INDENT>last_hidden_size = self.rnn_layers_sizes[-<NUM_LIT:1>]<EOL>data = torch.cat([data[:, -<NUM_LIT:1>, :last_hidden_size], data[:, <NUM_LIT:0>, last_hidden_size:]], dim=<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>data = data[:, -<NUM_LIT:1>]<EOL><DEDENT>for idx in range(len(self.linear_layers_sizes)):<EOL><INDENT>data = F.relu(self.linear_layers[idx](data))<EOL>if self.linear_dropout_layers:<EOL><INDENT>data = self.linear_dropout_layers[idx](data)<EOL><DEDENT><DEDENT>data = self.output_layer(data)<EOL>return self.output_activation(data)<EOL>
Forward propagate batch of sequences through the network, without accounting for the state