We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p142 にて全てのデータ点に対して平均をとる(定数で割る)とありますが、平均をとる操作はどこにあるのでしょうか。
# 初期値 w = torch.ones(()) b = torch.zeros(()) # In[14]:を別々に実行 dloss_dtp = dloss_fn(t_p, t_c) # len=11 dloss_dw = dloss_dtp * dmodel_dw(t_u, w, b) # len=11 dloss_db = dloss_dtp * dmodel_db(t_u, w, b) # len=11 torch.stack([dloss_dw.sum(), dloss_db.sum()]) # tensor([4517.2964, 82.6000])
torch.sum(dloss_dw) # 4517.2964
単純なsumを取ったものと出力が変わらなかったので、どこで平均を取るような処理がされているのか分かりませんでした。
初歩的な質問で申し訳ありませんが、回答頂けますと幸いです。 よろしくお願いいたします。
The text was updated successfully, but these errors were encountered:
この前までのところで 1/11 された状態が続いているので、合計することで1になるということかと自己解決しました。すみません。
Sorry, something went wrong.
No branches or pull requests
p142 にて全てのデータ点に対して平均をとる(定数で割る)とありますが、平均をとる操作はどこにあるのでしょうか。
単純なsumを取ったものと出力が変わらなかったので、どこで平均を取るような処理がされているのか分かりませんでした。
初歩的な質問で申し訳ありませんが、回答頂けますと幸いです。
よろしくお願いいたします。
The text was updated successfully, but these errors were encountered: