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

Function get_config

examples/boilerplate.py:45–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44
45def get_config():
46 logger.auto_set_dir()
47
48 ds_train = get_data('train')
49 ds_test = get_data('test')
50
51 return TrainConfig(
52 model=Model(),
53 data=QueueInput(ds_train),
54 callbacks=[
55 ModelSaver(),
56 InferenceRunner(ds_test, [ScalarStats('total_costs')]),
57 ],
58 steps_per_epoch=len(ds_train),
59 max_epoch=100,
60 )
61
62
63if __name__ == '__main__':

Callers 1

boilerplate.pyFile · 0.70

Calls 7

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

Tested by

no test coverage detected