MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / get_config

Function get_config

examples/HED/hed.py:249–267  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247
248
249def get_config():
250 logger.auto_set_dir()
251 dataset_train = get_data('train')
252 steps_per_epoch = len(dataset_train) * 40
253 dataset_val = get_data('val')
254
255 return TrainConfig(
256 dataflow=dataset_train,
257 callbacks=[
258 ModelSaver(),
259 ScheduledHyperParamSetter('learning_rate', [(30, 6e-6), (45, 1e-6), (60, 8e-7)]),
260 HumanHyperParamSetter('learning_rate'),
261 InferenceRunner(dataset_val,
262 BinaryClassificationStats('prediction', 'edgemap4d'))
263 ],
264 model=Model(),
265 steps_per_epoch=steps_per_epoch,
266 max_epoch=100,
267 )
268
269
270def run(model_path, image_path, output):

Callers 1

hed.pyFile · 0.70

Calls 8

TrainConfigClass · 0.85
ModelSaverClass · 0.85
InferenceRunnerClass · 0.85
get_dataFunction · 0.70
ModelClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…