MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / save_state

Function save_state

PATH/core/utils.py:108–114  ·  view source on GitHub ↗
(state, path, step)

Source from the content-addressed store, hash-verified

106 return acc
107
108def save_state(state, path, step):
109 path, filename = os.path.split(path)
110 assert path != ''
111 if not os.path.exists(path):
112 os.makedirs(path)
113 print('saving to {}/{}_iter_{}.pth.tar'.format(path, filename, step))
114 torch.save(state, '{}/{}_iter_{}.pth.tar'.format(path, filename, step))
115
116def load_last_iter(path):
117 if os.path.isfile(path):

Callers 2

saveMethod · 0.90
saveMethod · 0.90

Calls 1

saveMethod · 0.45

Tested by

no test coverage detected