When creating begin_states, the currently gluon RNN layer logic doesn't handle 
the dtype correctly (reported by @Ishitori). example:
```
fake_data = nd.random.uniform(shape=(batch_size, context_max_length, 8 * 
embedding_size), dtype="float16")
attention_output = nd.transpose(fake_data, axes=(1, 0, 2))
modeling_layer = LSTM(hidden_size=100, num_layers=2, dropout=0.2, 
bidirectional=True)
modeling_layer.cast("float16")
modeling_layer.initialize()
modeling_layer(attention_output)
```

@haojin2 could you include the fix?

[ Full content available at: 
https://github.com/apache/incubator-mxnet/pull/12541 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to