本文整理汇总了Python中Network.initLayer方法的典型用法代码示例。如果您正苦于以下问题:Python Network.initLayer方法的具体用法?Python Network.initLayer怎么用?Python Network.initLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network.initLayer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Network
# 需要导入模块: import Network [as 别名]
# 或者: from Network import initLayer [as 别名]
w = theano.shared(rng.randn(feats), name="w")
AlgParams['w'] = w
myNetwork = Network(numLayers, AlgorithmChoice, AlgParams, NumNodesPerLayer, 'Adjacent', 'Gray')
myNetwork.Layers[0][0].loadInput(img, 4)
myNetwork.Layers[0][0].initLayerLearningParams('LogRegression', AlgParams)
myNetwork.Layers[0][0].doLayerLearning(1)
exit(0)
for I in range(len(myNetwork.Layers)):
for J in range(len(myNetwork.Layers[0])):
if J == 0:
myNetwork.Layers[I][J].loadInput(img, 4)
else:
print type(J - 1)
exit(0)
myNetwork.Layers[I][0].loadInput(myNetwork.Layers[I][J - 1].Nodes, 4)
myNetwork.Layers[I][0].loadInput(img, 4)
myNetwork.initLayer(0)
#myNetwork.trainLayer(0)
'''
exit(0)
myNetwork.Layers[0][0].loadInput(img, 4)
myNetwork.initLayer(0)
myNetwork.trainLayer(0)
'''
'''
print "number of Layers"
print [len(myNetwork.Layers),len(myNetwork.Layers[0])]
print "number of Nodes in Layer 1"
print [myNetwork.Layers[0][0].Nodes[7][7].AlgorithmChoice]
'''