MCPcopy 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
443def get_model():
444 model = Mnist_Logistic()
445 return model, optim.SGD(model.parameters(), lr=lr)
446
447model, opt = get_model()
448print(loss_func(model(xb), yb))

Callers 1

nn_tutorial.pyFile · 0.85

Calls 1

Mnist_LogisticClass · 0.85

Tested by

no test coverage detected