Feedback about What is torch.nn really?
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
- #3667 @patrocinio による — マージされずにクローズ
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
調査の方向性
リンク先の nn_tutorial.html ページを開き、「Neural net from scratch (without torch.nn)」セクション、特に pre-training と final loss の評価を確認してください。トレーニングループを通じて xb と yb がどのように変化するかを追跡し、そのうえで、比較に一貫した評価用バッチを使用するか、テストデータセットを明示的に使用するようにチュートリアルを更新してください。表示される loss と accuracy の例に整合性が保たれていることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/nn_tutorial.html
In the section "Neural net from scratch (without torch.nn)" there is a pre-training loss function evaluation on a batch of 64 instances,
yb = y_train[0:bs]
print(loss_func(preds, yb))
then training is performed (comments my own)
for epoch in range(epochs):
for i in range((n - 1) // bs + 1):
# set_trace()
start_i = i * bs
end_i = start_i + bs
xb = x_train[start_i:end_i] # note that xb gets redefined
yb = y_train[start_i:end_i] # note that yb gets redefined
pred = model(xb)
loss = loss_func(pred, yb)
loss.backward()
with torch.no_grad():
weights -= weights.grad * lr
bias -= bias.grad * lr
weights.grad.zero_()
bias.grad.zero_()
and the loss function is evaluated again to demonstrate a reduction in loss.
print(loss_func(model(xb), yb), accuracy(model(xb), yb))
The final evaluation is not applied to the same data as the first though. Both invoke xb and yb, but xb and yb in the pre-training evaluation are the first 64 instances from the set, during training these variables are updated with subsequent batches and the final evaluation is performed on the final batch.
Pre and post-training evaluations should be performed on the same batch, either the original 64 instances from the first training batch, or (if the intent is to demonstrate generalization loss) the test dataset.
cc @albanD @jbschlosser
- 主要言語
- Python
- スター
- 9.4k
- フォーク
- 4.4k
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytorch/tutorials のほかの issue
-
Feedback about Datasets & DataLoaders対応中かも @hippi345 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信
-
💡 [REQUEST] - Add model.eval() after loading the mdoel対応中かも @Justee21 が 26 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
[BUG] Captum tutorial fails when visualize_image_attr() receives None for original_image再び着手できるかも @shubhambhar007 が 32 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pytorch/tutorials#3963 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[BUG] - Incorrect ResNet18 preprocessing in Captum tutorial対応中かも @austxu が 85 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
Feedback about What is torch.nn really?対応中かも @MichelleHan7 が 22 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
pytorch/tutorials の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
omegaup/omegaup#10353 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
bot-triaged module: LrScheduler module: optimizer triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
documentation glm5 llm-model
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vllm-project/vllm-ascend#19062 ·
メンテナーはふだん 1 日以内に返信
-
author-page correction
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
acl-org/acl-anthology#10496 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信