CNNTrainer_simpleConfig.py 518 Bytes
Newer Older
1
2
import logging
import mxnet as mx
3
import CNNCreator_simpleConfig
4
5
6
7

if __name__ == "__main__":
    logging.basicConfig(level=logging.DEBUG)
    logger = logging.getLogger()
8
    handler = logging.FileHandler("train.log", "w", encoding=None, delay="true")
9
10
    logger.addHandler(handler)

11
12
    simpleConfig = CNNCreator_simpleConfig.CNNCreator_simpleConfig()
    simpleConfig.train(
13
14
15
16
17
        batch_size=100,
        num_epoch=50,
        optimizer='adam',
        optimizer_params={
            'learning_rate': 0.001}
18
    )