本文整理匯總了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):