Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CausalLearning/robust-unlearnable-examples
/ model_state_to_cpu
Function
model_state_to_cpu
utils/generic.py:315–319 ·
view source on GitHub ↗
(model_state)
Source
from the content-addressed store, hash-verified
313
314
315
def
model_state_to_cpu(model_state):
316
model_state_cpu = type(model_state)()
317
for
key, val in model_state.items():
318
model_state_cpu[key] = val.cpu()
319
return
model_state_cpu
320
321
322
def
get_model_state(model):
Callers
1
get_model_state
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected