Skip to content

Commit 14efb91

Browse files
songzy12ZeyuChen
andauthored
Fix two typos in text classification examples rnn (#887)
Co-authored-by: Zeyu Chen <[email protected]>
1 parent 1ae0164 commit 14efb91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/text_classification/rnn/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class BoWModel(nn.Layer):
2525
"""
2626
This class implements the Bag of Words Classification Network model to classify texts.
2727
At a high level, the model starts by embedding the tokens and running them through
28-
a word embedding. Then, we encode these epresentations with a `BoWEncoder`.
28+
a word embedding. Then, we encode these representations with a `BoWEncoder`.
2929
Lastly, we take the output of the encoder to create a final representation,
3030
which is passed through some feed-forward layers to output a logits (`output_layer`).
3131

examples/text_classification/rnn/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def create_dataloader(dataset,
117117
padding_idx=pad_token_id)
118118
elif network == 'bilstm_attn':
119119
lstm_hidden_size = 196
120-
attention = SelfInteractiveAttention(hidden_size=2 * stm_hidden_size)
120+
attention = SelfInteractiveAttention(hidden_size=2 * lstm_hidden_size)
121121
model = BiLSTMAttentionModel(
122122
attention_layer=attention,
123123
vocab_size=vocab_size,

0 commit comments

Comments
 (0)