本文整理汇总了Python中NN.makeStandardConvolutionalNeuralNet方法的典型用法代码示例。如果您正苦于以下问题:Python NN.makeStandardConvolutionalNeuralNet方法的具体用法?Python NN.makeStandardConvolutionalNeuralNet怎么用?Python NN.makeStandardConvolutionalNeuralNet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NN
的用法示例。
在下文中一共展示了NN.makeStandardConvolutionalNeuralNet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: type
# 需要导入模块: import NN [as 别名]
# 或者: from NN import makeStandardConvolutionalNeuralNet [as 别名]
hAx.imshow(I,interpolation='none')
#raise Exception
plt.pause(0.01)
I.shape=I.shape+(1,)
X[:,:,:,:,i] = I.astype(np.double)/255.0
# gender
if f.find('-f')>0:
Z[0,0,i] = 1.0
Z[1,0,i] = 0.0
else:
Z[0,0,i] = 0.0
Z[1,0,i] = 1.0
nCopies = 4
nn = NN.makeStandardConvolutionalNeuralNet(inputShape=I.shape,outputDim=2,nCopies=nCopies,sigmaR=10.0)
nn.setTrainingData(X,Z)
layersToDraw = [l for l in nn if type(l) == type(NN.ComponentwiseFunction())]
nPlots = len(layersToDraw)
hFig.clf()
hFig2 = plt.figure()
nIter = 10000
nPerDraw = 1
nRepeats = nIter/nPerDraw
epsilon = 0.0001
epsilon = 0.00001
L = 1.0e10
for repeat in range(nRepeats):