eeg.py 文件源码

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

项目:python-machine-learning 作者: sho-87 项目源码 文件源码
def basic_conv(n=3, epochs=60):
    nets = []  # list of networks (for ensemble, if desired)
    for j in range(n):
        net = Network([
            ConvLayer(image_shape=(mini_batch_size, 1, 64, 512),
                      filter_shape=(20, 1, 3, 3), stride=(1, 1), activation_fn=relu),
            ConvPoolLayer(image_shape=(mini_batch_size, 20, 64, 512),
                          filter_shape=(40, 20, 3, 3), stride=(1, 1),
                          poolsize=(2, 2), activation_fn=relu),
            ConvPoolLayer(image_shape=(mini_batch_size, 40, 32, 256),
                          filter_shape=(80, 40, 3, 3), stride=(1, 1),
                          poolsize=(2, 2), activation_fn=relu),
            FullyConnectedLayer(n_in=80*16*128, n_out=100),
            SoftmaxLayer(n_in=100, n_out=2)],
            mini_batch_size, 50)

        net.SGD(train_data, epochs, mini_batch_size, 0.1,
                validation_data, test_data, lmbda=0.0)

        nets.append(net)  # Add current network to list
    return nets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号