zoukankan      html  css  js  c++  java
  • 神经网络结构设计 不一定是第一层神经元是输入维度数

    def get_model(input_dim=33):
        # Build neural network   
        net = tflearn.input_data(shape=[None, input_dim])
        net = batch_normalization(net)
        #net = tflearn.fully_connected(net, input_dim) #去掉这层的话 精度95+,如果加上精度很难上95%
        net = tflearn.fully_connected(net, 128, activation='tanh')
        net = dropout(net, 0.5)
        net = tflearn.fully_connected(net, 2, activation='softmax')
        net = tflearn.regression(net, optimizer='sgd',
                         loss='categorical_crossentropy', name='target') #  optimizer='sgd'
        # Define model
        model = tflearn.DNN(net)
        #filename = 'CC_model_999.tflearn'
        #model.load(filename)
        #print filename + " loaded OK"
        return model


  • 相关阅读:
    zombie处理
    exec
    fork
    udp program
    PS中进程状态
    关闭socket连接最好的方法
    setsockopt
    【Python】Webpy 源码学习
    web.py 安装
    WSGI、flup、fastcgi、web.py的关系
  • 原文地址:https://www.cnblogs.com/bonelee/p/9084741.html
Copyright © 2011-2022 走看看