import torch x = torch.tensor([1., -1.]) w = torch.tensor([1.0, 0.5], requires_grad=True) loss = -torch.dot(x, w).sigmoid().log() loss.backward() print(loss.item()) print(w.grad)

Python 3.13.5 documentation Welcome! This is the official documentation for Python 3.13.5. Documentation sections: What's new in Python 3.13? Or all "What's new" documents since Python 2.0 Tutorial Start here: a tour of Python's syntax and features Library reference Standard library and builtins Language reference Syntax and language elements Python setup and usage How to install, configure, and u
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く