mnist.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:convnet-nolearn 作者: jcouvy 项目源码 文件源码
def build_network(layers):
    """
    Builds and returns a NeuralNet object
    """
    return NeuralNet(
        layers = layers,

        batch_iterator_train = CropBatchIterator(batch_size=256),

        update = nesterov_momentum,
        update_learning_rate = theano.shared(float32(0.03)),
        update_momentum = theano.shared(float32(0.9)),    

        on_epoch_finished=[
            AdjustVariable('update_learning_rate', start=0.03, stop=0.0001),
            AdjustVariable('update_momentum', start=0.9, stop=0.999),
            EarlyStopping(patience=10),
            ],

        regression = False,
        max_epochs = 100,
        verbose = 2
        )

# --------------- Training the network ---------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号