Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/huggingface/transformers
/ train
Method
train
src/transformers/modeling_utils.py:4927–4931 ·
view source on GitHub ↗
(self, mode: bool = True)
Source
from the content-addressed store, hash-verified
4925
yield
name, tensor
4926
4927
def
train(self, mode: bool = True):
4928
out = super().train(mode)
4929
if
self.use_kernels:
4930
self.kernelize()
4931
return
out
4932
4933
def
eval(self):
4934
return
self.train(False)
Callers
1
eval
Method · 0.95
Calls
1
kernelize
Method · 0.95
Tested by
no test coverage detected