Skip to content

Commit

Permalink
Merge pull request #1029 from d2l-ai/master
Browse files Browse the repository at this point in the history
[hotfix] Add d2l-zh-2.0.0.zip
astonzhang authored Dec 5, 2021
2 parents 0e3803d + f61dac3 commit 2d9071c
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ def read_imdb(data_dir, is_train):
train_data = read_imdb(data_dir, is_train=True)
print('训练集数目:', len(train_data[0]))
for x, y in zip(train_data[0][:3], train_data[1][:3]):
print('label:', y, 'review:', x[0:60])
print('标签:', y, 'review:', x[0:60])
```

## 预处理数据集
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ class BiRNN(nn.Module):
self.decoder = nn.Linear(4 * num_hiddens, 2)
def forward(self, inputs):
# `inputs`的形状是(批量大小,,时间步数)
# `inputs`的形状是(批量大小,时间步数)
# 因为长短期记忆网络要求其输入的第一个维度是时间维,
# 所以在获得词元表示之前,输入会被转置。
# 输出形状为(时间步数,批量大小,词向量维度)
1 change: 1 addition & 0 deletions config.ini
Original file line number Diff line number Diff line change
@@ -174,6 +174,7 @@ reverse_alias =

other_file_s3urls = s3://d2l-webdata/releases/d2l-zh/d2l-zh-1.0.zip
s3://d2l-webdata/releases/d2l-zh/d2l-zh-1.1.zip
s3://d2l-webdata/releases/d2l-zh/d2l-zh-2.0.0.zip

google_analytics_tracking_id = UA-96378503-2

0 comments on commit 2d9071c

Please sign in to comment.