Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/tutorials
/ get_model
Function
get_model
beginner_source/nn_tutorial.py:443–445 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
441
# can reuse it in the future.
442
443
def
get_model():
444
model = Mnist_Logistic()
445
return
model, optim.SGD(model.parameters(), lr=lr)
446
447
model, opt = get_model()
448
print(loss_func(model(xb), yb))
Callers
1
nn_tutorial.py
File · 0.85
Calls
1
Mnist_Logistic
Class · 0.85
Tested by
no test coverage detected