Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HobbitLong/PyContrast
/ set_bn_train
Method
set_bn_train
pycontrast/learning/contrast_trainer.py:230–233 ·
view source on GitHub ↗
(m)
Source
from the content-addressed store, hash-verified
228
model_ema.eval()
229
230
def
set_bn_train(m):
231
classname = m.__class__.__name__
232
if
classname.find(
'BatchNorm'
) != -1:
233
m.train()
234
model_ema.apply(set_bn_train)
235
236
batch_time = AverageMeter()
Callers
nothing calls this directly
Calls
1
train
Method · 0.45
Tested by
no test coverage detected