Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ train
Function
train
imperative/python/test/integration/test_trace_dump.py:172–178 ·
view source on GitHub ↗
(d)
Source
from the content-addressed store, hash-verified
170
171
@trace(symbolic=True)
172
def
train(d):
173
with
gm:
174
loss = model(d)
175
gm.backward(loss)
176
177
optim.step().clear_grad()
178
return
loss
179
180
@trace(symbolic=True)
181
def
val(d):
Callers
1
test_ViTmode_trace_train
Function · 0.70
Calls
4
model
Function · 0.85
backward
Method · 0.45
clear_grad
Method · 0.45
step
Method · 0.45
Tested by
no test coverage detected