Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fix[#7382] fixes how the batch size is obtained in RNN forward pass. #7385

Merged
merged 1 commit into from Aug 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/mxnet/gluon/rnn/rnn_layer.py
Expand Up @@ -154,7 +154,7 @@ def begin_state(self, batch_size=0, func=ndarray.zeros, **kwargs):
def forward(self, inputs, states):
if isinstance(states, ndarray.NDArray):
states = [states]
batch_size = states[0].shape[self._layout.find('N')]
batch_size = inputs.shape[self._layout.find('N')]
for state, info in zip(states, self.state_info(batch_size)):
if state.shape != info['shape']:
raise ValueError(
Expand Down