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


Python Testing.buildNeuralNet方法代码示例

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


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

示例1: max

# 需要导入模块: import Testing [as 别名]
# 或者: from Testing import buildNeuralNet [as 别名]
import Testing
import NeuralNetUtil
import NeuralNet

n = 0
print "~~~~~~~~~~~~~~~~~~~~~~~TestCarData~~~~~~~~~~~~~~~~~~~~~~~"
while n <= 40:
    c = 0
    carList = []
    print "------- #", n, "neurons per hidden layer -------"
    while c < 5:
        print "Iteration #", c + 1
        car_Net, car_test = Testing.buildNeuralNet(Testing.carData, maxItr = 200, hiddenLayerList = [n])
        carList.append(car_test)
        c += 1
    
    print "Iteration result:"
    print "Accuracy standard deviation", Testing.stDeviation(carList)
    print "Accuracy average:", Testing.average(carList)
    print "Max Accuracy:", max(carList)
    n += 5


开发者ID:raymondhehe,项目名称:Georgia-Tech-course-work,代码行数:23,代码来源:question6_car.py

示例2: max

# 需要导入模块: import Testing [as 别名]
# 或者: from Testing import buildNeuralNet [as 别名]
import Testing
import NeuralNetUtil
import NeuralNet

print "----------------- testPenData --------------------"
numNeurons = 0
while numNeurons <= 40:
	print "--------------running with", numNeurons , "neurons per hidden layer------------------"
	i = 0
	acclist = []
	while i < 5:
		print "running iteration #", i+1
		nnet, testAccuracy = Testing.buildNeuralNet(Testing.penData,maxItr = 200, hiddenLayerList = [numNeurons])
		acclist.append(testAccuracy)
		i = i + 1

	print "Iterations finished"
	print "accuracy average:", Testing.average(acclist)
	print "accuracy standard deviation:", Testing.stDeviation(acclist)
	print "max accuracy:", max(acclist)
	numNeurons = numNeurons + 5

print "----------------- testCarData --------------------"
numNeurons = 0
while numNeurons <= 40:
	print "--------------running with", numNeurons , "neurons per hidden layer------------------"
	i = 0
	acclist = []
	while i < 5:
		print "running iteration #", i+1
		nnet, testAccuracy = Testing.buildNeuralNet(Testing.carData,maxItr = 200, hiddenLayerList = [numNeurons])
开发者ID:dshen36,项目名称:CS-3600-Spring-2015,代码行数:33,代码来源:q6.py


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