Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/tutorials
/ log_softmax
Function
log_softmax
beginner_source/nn_tutorial.py:138–139 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
136
# automatically.
137
138
def
log_softmax(x):
139
return
x - x.exp().sum(-1).log().unsqueeze(-1)
140
141
def
model(xb):
142
return
log_softmax(xb @ weights + bias)
Callers
1
model
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected