MCPcopy Create free account
hub / github.com/EryiXie/PlaneRecNet / from_str

Method from_str

utils/utils.py:119–134  ·  view source on GitHub ↗
(path:str)

Source from the content-addressed store, hash-verified

117
118 @staticmethod
119 def from_str(path:str):
120 file_name = os.path.basename(path)
121
122 if file_name.endswith('.pth'):
123 file_name = file_name[:-4]
124
125 params = file_name.split('_')
126
127 if file_name.endswith('interrupt'):
128 params = params[:-1]
129
130 model_name = '_'.join(params[:-2])
131 epoch = params[-2]
132 iteration = params[-1]
133
134 return SavePath(model_name, int(epoch), int(iteration))
135
136 @staticmethod
137 def remove_interrupt(save_folder):

Callers 3

eval.pyFile · 0.80
trainFunction · 0.80
get_latestMethod · 0.80

Calls 1

SavePathClass · 0.85

Tested by

no test coverage detected