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

Function get_config

examples/ImageNetModels/inception-bn.py:134–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def get_config():
135 logger.auto_set_dir()
136 dataset_train = get_data('train')
137 dataset_val = get_data('val')
138
139 return TrainConfig(
140 dataflow=dataset_train,
141 callbacks=[
142 ModelSaver(),
143 InferenceRunner(dataset_val, [
144 ClassificationError('wrong-top1', 'val-top1-error'),
145 ClassificationError('wrong-top5', 'val-top5-error')]),
146 ScheduledHyperParamSetter('learning_rate',
147 [(8, 0.03), (14, 0.02), (17, 5e-3),
148 (19, 3e-3), (24, 1e-3), (26, 2e-4),
149 (30, 5e-5)])
150 ],
151 model=Model(),
152 steps_per_epoch=5000,
153 max_epoch=80,
154 )
155
156
157if __name__ == '__main__':

Callers 1

inception-bn.pyFile · 0.70

Calls 7

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

Tested by

no test coverage detected