当前位置: 首页>>代码示例>>Python>>正文


Python NeuralNetwork.activate方法代码示例

本文整理汇总了Python中NeuralNetwork.NeuralNetwork.activate方法的典型用法代码示例。如果您正苦于以下问题:Python NeuralNetwork.activate方法的具体用法?Python NeuralNetwork.activate怎么用?Python NeuralNetwork.activate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NeuralNetwork.NeuralNetwork的用法示例。


在下文中一共展示了NeuralNetwork.activate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: NNConfiguration

# 需要导入模块: from NeuralNetwork import NeuralNetwork [as 别名]
# 或者: from NeuralNetwork.NeuralNetwork import activate [as 别名]
'''
The Neural Network is invoked to test unclassified instances with the sunspots. (Production)
'''
'''
cnf = NNConfiguration(  None, 
                        1, 
                        [21, 1], 
                        11, 
                        "./src/dataset/good_sunspot_test.dat", 
                        "./WEIGHTS_May_12_19_35.txt")
'''
'''
nn = NeuralNetwork(cnf)
'''

nn.activate(1, 1)

###############################################################
###############################################################
####            SUN SPOT TRAINING AND TEST END            #####
###############################################################
###############################################################



###############################################################
###############################################################
####            POLIO TRAINING AND TEST START           #####
###############################################################
###############################################################
开发者ID:newlog,项目名称:college,代码行数:32,代码来源:test_neural_network.py

示例2: usage

# 需要导入模块: from NeuralNetwork import NeuralNetwork [as 别名]
# 或者: from NeuralNetwork.NeuralNetwork import activate [as 别名]
@author: newlog
'''

import sys
from NNConfiguration import NNConfiguration
from NeuralNetwork import NeuralNetwork
import time


def usage():
    print "\n[?] You only have to pass the configuration file."
    print "Coded by Newlog, see you console cowboys\n"

if __name__ == '__main__':
    if len(sys.argv) != 2:
        # The program has been invoked incorrectly
        usage()
        exit()
    
    # The program has been invoked with a configuration file
    nn_conf = NNConfiguration(sys.argv[1])    
    # Now we can build the neural network
    nn = NeuralNetwork(nn_conf)
    # Now we can activate the neural network
    init = time.time()
    nn.activate()
    final = time.time()
    print "[+] Execution time: %s seconds" % str(final - init)
    print "[*] Well done, Neural Cowboy."
开发者ID:newlog,项目名称:college,代码行数:31,代码来源:NeuralCowboy.py


注:本文中的NeuralNetwork.NeuralNetwork.activate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。