Skip to content

Instantly share code, notes, and snippets.

@takatakamanbou takatakamanbou/00_ex150912.md Secret
Last active Sep 13, 2015

Embed
What would you like to do?
import numpy as np
import scipy as sp
import datetime
import cifar10
import cifar10_sub150823 as cifar10_sub
import convnet150907 as convnet
# Conv-Pool-Conv-Pool-ReLu-ReLu-Softmax
def CPCPRRS( Xnch, Xrow, Xcol, K, dropout = False ):
if dropout:
do = [ 0.8, 0.8, 0.8, 0.5, 0.5, 1.0 ]
else:
do = [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
bmode = 'full'
# 0th Layer
Xdim = ( Xnch, Xrow, Xcol )
L0 = convnet.T4InputLayer( Xdim, dropout = do[0] )
# 1st Layer
W1dim = ( 128, 5, 5 )
L1conv = convnet.ConvLayer( Xdim, W1dim, 'ReLu', withBias = True, border_mode = bmode )
ds1, st1 = ( 2, 2 ), None
L1pool = convnet.PoolLayer( L1conv.Yshape, ds1, st = st1, dropout = do[1] )
H1 = L1pool.Dout
# 2nd Layer
W2dim = ( 128, 5, 5 )
L2conv = convnet.ConvLayer( L1pool.Yshape, W2dim, 'ReLu', withBias = True, border_mode = bmode )
ds2, st2 = ( 2, 2 ), None
L2pool = convnet.PoolLayer( L2conv.Yshape, ds2, st = st2, dropout = do[2] )
H2 = L2pool.Dout
# 3rd Layer
H3 = 1000
L3 = convnet.FullLayer( H2, H3, 'ReLu', withBias = True, dropout = do[3], T4toMat = True )
# 4th Layer
H4 = 1000
L4 = convnet.FullLayer( H3, H4, 'ReLu', withBias = True, dropout = do[4], T4toMat = False )
# 5th Layer
L5 = convnet.FullLayer( H4, K, 'linear', withBias = True, dropout = do[5], T4toMat = False )
cnn = convnet.CNN( [ L0, L1conv, L1pool, L2conv, L2pool, L3, L4, L5 ] )
print '### Conv-Pool-Conv-Pool-ReLu-ReLu-Softmax'
print '# T4InputLayer: ', L0.Xshape, ' dropout = ', L0.dropout
layer = L1conv
print '# ConvLayer: ', layer.Wshape, ' bmode = ', layer.border_mode, ' dropout = ', layer.dropout
layer = L1pool
print '# PoolLayer: ', layer.Yshape, ' ds = ', layer.ds, ' st = ', layer.st, ' dropout = ', layer.dropout
layer = L2conv
print '# ConvLayer: ', layer.Wshape, ' bmode = ', layer.border_mode, ' dropout = ', layer.dropout
layer = L2pool
print '# PoolLayer: ', layer.Yshape, ' ds = ', layer.ds, ' st = ', layer.st, ' dropout = ', layer.dropout
layer = L3
print '# FullLayer: ', layer.Din, layer.Nunit, layer.afunc, layer.dropout
layer = L4
print '# FullLayer: ', layer.Din, layer.Nunit, layer.afunc, layer.dropout
layer = L5
print '# FullLayer: ', layer.Din, layer.Nunit, layer.afunc, layer.dropout
return cnn
# computing the recognition rate
def recograte( cnn, X, label, batchsize, dstshape ):
N = X.shape[0]
nbatch = int( np.ceil( float( N ) / batchsize ) )
LL = 0.0
cnt = 0
for ib in range( nbatch - 1 ):
ii = np.arange( ib*batchsize, (ib+1)*batchsize )
XX = cifar10_sub.clipcenter( X[ii], dstshape )
Z = cnn.output( XX )
LL += cnn.cost( Z, label[ii] ) * ii.shape[0]
cnt += np.sum( label[ii] == np.argmax( Z, axis = 1 ) )
ib = nbatch - 1
ii = np.arange( ib*batchsize, N )
XX = cifar10_sub.clipcenter( X[ii], dstshape )
Z = cnn.output( XX )
LL += cnn.cost( Z, label[ii] ) * ii.shape[0]
cnt += np.sum( label[ii] == np.argmax( Z, axis = 1 ) )
return LL / N, float( cnt ) / N
def weightnorm( cnn ):
W2list = []
for layer in cnn.Layers:
if isinstance( layer, convnet.T4InputLayer ) or isinstance( layer, convnet.PoolLayer ):
continue
Wb = layer.getWeight()
if layer.withBias:
W = Wb[0]
else:
W = Wb
W2list.append( np.mean( np.square( W ) ) )
return np.asarray( W2list )
if __name__ == "__main__":
idstr = datetime.datetime.now().strftime('%Y%m%d-%H%M%S')
print '### ID: ', idstr
dirCIFAR10 = '../140823-pylearn2/data/cifar10/cifar-10-batches-py'
cifar = cifar10.CIFAR10( dirCIFAR10 )
ZCAwhitening = True
tfunc = cifar10_sub.translate2
dstshape = ( 24, 24 )
##### setting the training data & the validation data
#
Xraw, label, t = cifar.loadData( 'L' )
Xraw /= 255
xm = np.mean( Xraw, axis = 0 )
Xraw -= xm
if ZCAwhitening:
X, Uzca = cifar10_sub.ZCAtrans( Xraw, Uzca = None )
else:
X = Xraw
X = np.asarray( X, dtype = np.float32 )
label = np.asarray( label, dtype = np.int32 )
idxL, idxV = cifar.genIndexLV( label )
XL, labelL = X[idxL], label[idxL]
XV, labelV = X[idxV], label[idxV]
NL, Xnch = XL.shape[0], XL.shape[1]
Xrow, Xcol = dstshape[0], dstshape[1]
NV = XV.shape[0]
K = cifar.nclass
Xdim = ( Xrow, Xcol )
np.random.seed( 0 )
batchsize = 100
idxB = cifar10_sub.makebatchindex( NL, batchsize )
nbatch = idxB.shape[0]
##### setting the test data
#
XTraw, labelT, tT = cifar.loadData( 'T' )
XTraw /= 255
XTraw -= xm
if ZCAwhitening:
XT = cifar10_sub.ZCAtrans( XTraw, Uzca = Uzca )
else:
XT = XTraw
XT = np.asarray( XT, dtype = np.float32 )
labelT = np.asarray( labelT, dtype = np.int32 )
NT = XT.shape[0]
##### initializing
#
cnn = CPCPRRS( Xnch, Xrow, Xcol, K, dropout = False )
##### training
#
eta, mu, lam = 0.01, 0.95, 0.0
#eta, mu, lam = 0.01, 0.95, 0.0001
nepoch = 200
print '# eta = ', eta, ' mu = ', mu, ' lam = ', lam
print '# ZCAwhitening = ', ZCAwhitening, ' tfunc = ', tfunc.__name__, ' dstshape = ', dstshape
print '### training: NL = ', NL, ' NV = ', NV, ' K = ', K, ' batchsize = ', batchsize
i = 0
mnLLL, rrL = recograte( cnn, XL, labelL, batchsize, dstshape )
mnLLV, rrV = recograte( cnn, XV, labelV, batchsize, dstshape )
print '%d | %.4f %.2f | %.4f %.2f' % ( i, mnLLL, rrL * 100, mnLLV, rrV * 100 ),
w2 = weightnorm( cnn )
print ' | ', w2
for i in range( 1, nepoch ):
# training (selecting each batch in random order)
for ib in np.random.permutation( nbatch ):
ii = idxB[ib, :]
XX = tfunc( XL[ii], dstshape )
cnn.train( XX, labelL[ii], eta, mu, lam )
# printing error rates etc.
if (i < 10) or ( i % 10 == 0 ):
mnLLL, rrL = recograte( cnn, XL, labelL, batchsize, dstshape )
mnLLV, rrV = recograte( cnn, XV, labelV, batchsize, dstshape )
print '%d | %.4f %.2f | %.4f %.2f' % ( i, mnLLL, rrL * 100, mnLLV, rrV * 100 ),
if i % 50 == 0:
mnLLT, rrT = recograte( cnn, XT, labelT, batchsize, dstshape )
print '| %.4f %.2f' % ( mnLLT, rrT * 100 ),
w2 = weightnorm( cnn )
print ' | ', w2
i = nepoch
##### setting the test data
#
print '# NT = ', NT
mnLLT, rrT = recograte( cnn, XT, labelT, batchsize, dstshape )
print '%d | %.4f %.2f | %.4f %.2f | %.4f %.2f' % ( i, mnLLL, rrL * 100, mnLLV, rrV * 100, mnLLT, rrT * 100 )
print '### ID: ', idstr
Using gpu device 0: Tesla K20c
### ID: 20150912-172131
##### CIFAR-10 #####
# label_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
# num_vis = 3072
### Conv-Pool-Conv-Pool-ReLu-ReLu-Softmax
# T4InputLayer: (3, 24, 24) dropout = 1.0
# ConvLayer: (128, 3, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 14, 14) ds = (2, 2) st = None dropout = 1.0
# ConvLayer: (128, 128, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 9, 9) ds = (2, 2) st = None dropout = 1.0
# FullLayer: 10368 1000 ReLu 1.0
# FullLayer: 1000 1000 ReLu 1.0
# FullLayer: 1000 10 linear 1.0
# eta = 0.01 mu = 0.95 lam = 0.0
# ZCAwhitening = True tfunc = translate2 dstshape = (24, 24)
### training: NL = 40000 NV = 10000 K = 10 batchsize = 100
0 | 2.3026 10.05 | 2.3026 9.83 | [ 1.00279962e-04 9.98201722e-05 9.85587467e-05 9.99318290e-05
9.96160597e-05]
1 | 1.8214 30.09 | 1.8282 29.61 | [ 3.30889889e-04 1.04340150e-04 9.88007741e-05 1.01784724e-04
3.91795533e-04]
2 | 1.4401 47.44 | 1.4381 47.17 | [ 1.03286188e-03 1.28367348e-04 9.98987525e-05 1.07133077e-04
9.63442493e-04]
3 | 1.0136 64.62 | 1.0233 63.89 | [ 0.00175717 0.00017217 0.00010206 0.00011366 0.00141834]
4 | 0.8471 70.93 | 0.8737 70.16 | [ 0.00235596 0.00022238 0.0001049 0.0001192 0.00168022]
5 | 0.7824 72.45 | 0.8130 71.13 | [ 0.00290592 0.00027598 0.00010821 0.0001248 0.00185942]
6 | 0.6830 76.72 | 0.7296 74.85 | [ 0.00338614 0.00032758 0.00011183 0.00013071 0.00202569]
7 | 0.6231 78.31 | 0.6862 76.38 | [ 0.0038125 0.00037582 0.00011573 0.00013653 0.00213466]
8 | 0.5977 79.20 | 0.6758 76.40 | [ 0.004233 0.00042569 0.00011996 0.00014281 0.00226515]
9 | 0.5392 81.19 | 0.6205 78.14 | [ 0.00463095 0.0004742 0.00012428 0.00014897 0.00237137]
10 | 0.4892 82.85 | 0.5968 79.23 | [ 0.00498659 0.00052187 0.00012885 0.00015559 0.00249363]
20 | 0.2715 90.64 | 0.5324 82.64 | [ 0.00827766 0.00097417 0.00018124 0.00023615 0.00366554]
30 | 0.1737 94.06 | 0.5433 83.08 | [ 0.01081312 0.00138692 0.00023846 0.0003387 0.00477095]
40 | 0.1184 95.88 | 0.6167 83.16 | [ 0.01302432 0.00176856 0.00029664 0.00045592 0.00582456]
50 | 0.0790 97.42 | 0.6149 83.34 | 0.6480 82.89 | [ 0.0148371 0.00211165 0.0003524 0.00057952 0.00660201]
60 | 0.0621 98.00 | 0.6616 83.14 | [ 0.01646809 0.00242292 0.00040439 0.00070466 0.00722994]
70 | 0.0399 98.75 | 0.6865 84.05 | [ 0.01774984 0.00270866 0.00045222 0.0008326 0.00772209]
80 | 0.0353 98.87 | 0.7525 83.62 | [ 0.01880803 0.00297623 0.00049806 0.00095713 0.00820143]
90 | 0.0348 98.82 | 0.7671 83.87 | [ 0.01983937 0.00322058 0.00054132 0.00107675 0.00852383]
100 | 0.0262 99.12 | 0.7764 83.45 | 0.8078 83.26 | [ 0.02083785 0.00345156 0.00058295 0.00119557 0.00884546]
110 | 0.0269 99.15 | 0.8082 83.51 | [ 0.02172995 0.00367146 0.00062327 0.00131092 0.00907372]
120 | 0.0289 99.06 | 0.8363 83.56 | [ 0.02258009 0.00388797 0.0006627 0.00142599 0.00923339]
130 | 0.0300 98.97 | 0.8538 83.48 | [ 0.02321214 0.0040869 0.00070027 0.00153798 0.00935004]
140 | 0.0201 99.33 | 0.8840 83.67 | [ 0.02370822 0.00429082 0.00073815 0.00164912 0.00945787]
150 | 0.0199 99.35 | 0.8911 83.57 | 0.9465 82.97 | [ 0.02439553 0.00449025 0.00077586 0.001761 0.00948193]
160 | 0.0208 99.34 | 0.9234 83.69 | [ 0.0250494 0.00467992 0.00081074 0.00186693 0.00954347]
170 | 0.0270 99.11 | 0.9914 83.15 | [ 0.02562612 0.0048658 0.00084447 0.00197117 0.00966675]
180 | 0.0204 99.31 | 0.9583 83.55 | [ 0.0261615 0.00504193 0.00087763 0.00207369 0.00969668]
190 | 0.0173 99.46 | 0.9380 83.39 | [ 0.0266975 0.00522218 0.00091118 0.0021767 0.009704 ]
# NT = 10000
200 | 0.0173 99.46 | 0.9380 83.39 | 1.0750 83.03
### ID: 20150912-172131
real 164m2.976s
user 144m7.975s
sys 27m28.293s
Using gpu device 0: Tesla K20c
### ID: 20150912-200820
##### CIFAR-10 #####
# label_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
# num_vis = 3072
### Conv-Pool-Conv-Pool-ReLu-ReLu-Softmax
# T4InputLayer: (3, 24, 24) dropout = 0.8
# ConvLayer: (128, 3, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 14, 14) ds = (2, 2) st = None dropout = 0.8
# ConvLayer: (128, 128, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 9, 9) ds = (2, 2) st = None dropout = 0.8
# FullLayer: 10368 1000 ReLu 0.5
# FullLayer: 1000 1000 ReLu 0.5
# FullLayer: 1000 10 linear 1.0
# eta = 0.01 mu = 0.95 lam = 0.0
# ZCAwhitening = True tfunc = translate2 dstshape = (24, 24)
### training: NL = 40000 NV = 10000 K = 10 batchsize = 100
0 | 2.3026 10.05 | 2.3026 9.84 | [ 1.00279962e-04 9.98201722e-05 9.85587467e-05 9.99318290e-05
9.96160597e-05]
1 | 2.3025 10.00 | 2.3025 10.00 | [ 1.01507721e-04 9.98496980e-05 9.85600345e-05 9.99428157e-05
1.01116646e-04]
2 | 2.3002 16.89 | 2.3000 16.90 | [ 1.13743197e-04 1.00148573e-04 9.85734805e-05 1.00065503e-04
1.14980816e-04]
3 | 2.1128 17.79 | 2.1133 17.95 | [ 2.29167243e-04 1.02846388e-04 9.87235398e-05 1.01716607e-04
3.42131738e-04]
4 | 1.9237 26.07 | 1.9283 25.66 | [ 4.65041987e-04 1.06739200e-04 9.91625348e-05 1.05933999e-04
7.53733621e-04]
5 | 1.8547 26.42 | 1.8536 26.35 | [ 0.00080568 0.00011381 0.00010002 0.00011441 0.00127208]
6 | 1.6171 38.48 | 1.6156 38.74 | [ 0.00127916 0.00013031 0.00010118 0.00012421 0.00173185]
7 | 1.4674 47.43 | 1.4609 47.92 | [ 0.00190587 0.00015639 0.00010282 0.00013542 0.00223608]
8 | 1.2908 54.69 | 1.2857 55.24 | [ 0.00253262 0.00018948 0.000105 0.00014773 0.00283325]
9 | 1.2557 55.30 | 1.2553 55.22 | [ 0.0032095 0.00022653 0.00010749 0.00015867 0.00330801]
10 | 1.0436 63.76 | 1.0548 62.79 | [ 0.00385334 0.00026901 0.00011034 0.00016946 0.00376348]
20 | 0.6434 77.59 | 0.7003 75.63 | [ 0.00805229 0.00070951 0.00014866 0.00025492 0.00638324]
30 | 0.4934 82.84 | 0.5875 79.70 | [ 0.0110274 0.00113235 0.00019446 0.00033398 0.00797521]
40 | 0.4147 85.61 | 0.5531 80.81 | [ 0.01332638 0.00152387 0.00024119 0.00041285 0.00899274]
50 | 0.3460 88.32 | 0.4960 82.92 | 0.5145 82.45 | [ 0.0153383 0.00189471 0.00028935 0.00049283 0.00982334]
60 | 0.3105 89.83 | 0.4803 83.36 | [ 0.01710738 0.00225149 0.00033773 0.00057532 0.01046197]
70 | 0.2654 91.37 | 0.4572 84.35 | [ 0.0187951 0.00259346 0.00038676 0.00065867 0.01090384]
80 | 0.2416 92.16 | 0.4534 84.47 | [ 0.02023123 0.00292409 0.00043397 0.00074203 0.01126879]
90 | 0.2117 93.53 | 0.4363 84.90 | [ 0.02137272 0.00324674 0.00048092 0.00082488 0.01156267]
100 | 0.1956 94.36 | 0.4257 85.47 | 0.4445 85.26 | [ 0.02261197 0.00355836 0.00052768 0.00090855 0.01174919]
110 | 0.1870 94.78 | 0.4285 85.18 | [ 0.0238111 0.00386424 0.00057438 0.00099182 0.01190128]
120 | 0.1744 95.03 | 0.4249 85.12 | [ 0.02464992 0.00415997 0.00062056 0.00107409 0.01201923]
130 | 0.1619 95.61 | 0.4209 85.66 | [ 0.02571557 0.00444803 0.00066646 0.00115468 0.01205692]
140 | 0.1589 95.57 | 0.4282 84.95 | [ 0.0267047 0.00473732 0.00071226 0.0012341 0.01212959]
150 | 0.1476 96.47 | 0.4125 85.74 | 0.4330 85.51 | [ 0.02742649 0.00501165 0.00075703 0.0013123 0.01207088]
160 | 0.1403 96.62 | 0.4126 86.11 | [ 0.02795892 0.00527843 0.00080129 0.0013886 0.01198833]
170 | 0.1381 96.46 | 0.4220 85.56 | [ 0.02883123 0.00554414 0.00084313 0.00146315 0.01189026]
180 | 0.1190 97.30 | 0.4070 85.96 | [ 0.02960866 0.00580182 0.00088492 0.00153667 0.01193081]
190 | 0.1181 97.38 | 0.4152 86.39 | [ 0.03017104 0.00605516 0.00092648 0.00160849 0.01171767]
# NT = 10000
200 | 0.1181 97.38 | 0.4152 86.39 | 0.4318 85.72
### ID: 20150912-200820
real 166m55.033s
user 145m0.825s
sys 29m26.175s
Using gpu device 0: Tesla K20c
### ID: 20150913-082243
##### CIFAR-10 #####
# label_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
# num_vis = 3072
### Conv-Pool-Conv-Pool-ReLu-ReLu-Softmax
# T4InputLayer: (3, 24, 24) dropout = 1.0
# ConvLayer: (128, 3, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 14, 14) ds = (2, 2) st = None dropout = 1.0
# ConvLayer: (128, 128, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 9, 9) ds = (2, 2) st = None dropout = 1.0
# FullLayer: 10368 1000 ReLu 1.0
# FullLayer: 1000 1000 ReLu 1.0
# FullLayer: 1000 10 linear 1.0
# eta = 0.01 mu = 0.95 lam = 0.001
# ZCAwhitening = True tfunc = translate2 dstshape = (24, 24)
### training: NL = 40000 NV = 10000 K = 10 batchsize = 100
0 | 2.3026 10.05 | 2.3026 9.83 | [ 1.00279962e-04 9.98201722e-05 9.85587467e-05 9.99318290e-05
9.96160597e-05]
1 | 1.8533 27.93 | 1.8581 27.43 | [ 2.81849643e-04 8.96804122e-05 8.46513940e-05 8.74272737e-05
3.50327115e-04]
2 | 1.4965 44.19 | 1.4937 43.95 | [ 9.14479198e-04 9.72819325e-05 7.29600943e-05 7.91642815e-05
8.37809290e-04]
3 | 1.0384 63.44 | 1.0512 62.67 | [ 1.55940186e-03 1.22515659e-04 6.40729559e-05 7.38931994e-05
1.22815312e-03]
4 | 0.8420 70.55 | 0.8694 69.99 | [ 2.03604391e-03 1.53978996e-04 5.71567471e-05 6.86732383e-05
1.42996979e-03]
5 | 0.8311 70.97 | 0.8550 69.62 | [ 2.43653334e-03 1.84266915e-04 5.17857115e-05 6.42463929e-05
1.54140964e-03]
6 | 0.6771 76.75 | 0.7156 75.65 | [ 2.76397774e-03 2.10622282e-04 4.74505396e-05 6.08453302e-05
1.64950732e-03]
7 | 0.6829 76.40 | 0.7350 74.74 | [ 3.00896913e-03 2.33687504e-04 4.40499680e-05 5.79010484e-05
1.70103030e-03]
8 | 0.6322 78.27 | 0.6872 76.21 | [ 3.19010625e-03 2.53041915e-04 4.13633788e-05 5.55844454e-05
1.75156235e-03]
9 | 0.5859 79.64 | 0.6511 77.18 | [ 3.40947555e-03 2.70530931e-04 3.91912945e-05 5.38042987e-05
1.81242905e-03]
10 | 0.6061 78.86 | 0.6937 75.80 | [ 3.59719037e-03 2.86694645e-04 3.76875614e-05 5.26653239e-05
1.88885769e-03]
20 | 0.3623 87.55 | 0.5335 81.62 | [ 4.67639696e-03 3.93186463e-04 3.68942492e-05 5.18014131e-05
2.42036511e-03]
30 | 0.3161 89.41 | 0.5223 82.26 | [ 5.21655800e-03 4.45717771e-04 4.36038426e-05 5.61808411e-05
2.84226867e-03]
40 | 0.3069 89.97 | 0.5446 81.65 | [ 5.66690648e-03 4.77793743e-04 4.98786794e-05 6.03113549e-05
3.13564576e-03]
50 | 0.2624 91.42 | 0.5271 82.29 | 0.5558 81.19 | [ 5.94817102e-03 4.98104375e-04 5.39046268e-05 6.28500493e-05
3.33240232e-03]
60 | 0.2470 91.80 | 0.5300 81.96 | [ 6.13118242e-03 5.06869459e-04 5.65473783e-05 6.51239679e-05
3.52488295e-03]
70 | 0.2112 93.08 | 0.4910 83.18 | [ 6.29355572e-03 5.13895589e-04 5.81777058e-05 6.64632753e-05
3.64813814e-03]
80 | 0.2184 93.19 | 0.5180 82.58 | [ 6.34290790e-03 5.15305903e-04 5.91735770e-05 6.68673456e-05
3.64282075e-03]
90 | 0.2315 92.58 | 0.5350 82.58 | [ 6.43793680e-03 5.24250907e-04 6.05574605e-05 6.83906183e-05
3.73698887e-03]
100 | 0.2247 92.66 | 0.5328 81.96 | 0.5666 81.73 | [ 6.50912290e-03 5.22333838e-04 6.09863964e-05 6.87078282e-05
3.80479079e-03]
110 | 0.2091 93.11 | 0.5131 83.28 | [ 6.56797085e-03 5.28296048e-04 6.19514685e-05 6.93505790e-05
3.83741292e-03]
120 | 0.2039 93.30 | 0.5111 83.08 | [ 6.65209070e-03 5.25584503e-04 6.17763289e-05 6.95417402e-05
3.85706569e-03]
130 | 0.2002 93.61 | 0.5013 83.20 | [ 6.63874578e-03 5.28265082e-04 6.22975276e-05 6.98672593e-05
3.86751164e-03]
140 | 0.1962 93.52 | 0.5304 82.29 | [ 6.75460324e-03 5.31985657e-04 6.26386245e-05 7.05297425e-05
3.97836138e-03]
150 | 0.2044 93.31 | 0.5163 82.53 | 0.5269 82.43 | [ 6.72965217e-03 5.31386351e-04 6.27811678e-05 7.02735124e-05
3.91292525e-03]
160 | 0.1879 93.95 | 0.4958 83.61 | [ 6.72689453e-03 5.30294608e-04 6.33373274e-05 7.05276616e-05
3.93887609e-03]
170 | 0.1907 93.74 | 0.5066 83.18 | [ 6.75440719e-03 5.27980214e-04 6.30563009e-05 7.08982916e-05
4.01050597e-03]
180 | 0.1867 94.10 | 0.5016 83.45 | [ 6.83035050e-03 5.27819037e-04 6.35400647e-05 7.16081995e-05
4.04837495e-03]
190 | 0.1870 93.84 | 0.5129 82.92 | [ 6.82903128e-03 5.34632942e-04 6.36717959e-05 7.16036302e-05
4.04216023e-03]
# NT = 10000
200 | 0.1870 93.84 | 0.5129 82.92 | 0.5276 83.03
### ID: 20150913-082243
real 164m56.452s
user 143m53.409s
sys 28m37.742s
Using gpu device 0: Tesla K20c
### ID: 20150913-110837
##### CIFAR-10 #####
# label_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
# num_vis = 3072
### Conv-Pool-Conv-Pool-ReLu-ReLu-Softmax
# T4InputLayer: (3, 24, 24) dropout = 1.0
# ConvLayer: (128, 3, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 14, 14) ds = (2, 2) st = None dropout = 1.0
# ConvLayer: (128, 128, 5, 5) bmode = full dropout = 1.0
# PoolLayer: (128, 9, 9) ds = (2, 2) st = None dropout = 1.0
# FullLayer: 10368 1000 ReLu 1.0
# FullLayer: 1000 1000 ReLu 1.0
# FullLayer: 1000 10 linear 1.0
# eta = 0.01 mu = 0.95 lam = 0.0001
# ZCAwhitening = True tfunc = translate2 dstshape = (24, 24)
### training: NL = 40000 NV = 10000 K = 10 batchsize = 100
0 | 2.3026 10.05 | 2.3026 9.83 | [ 1.00279962e-04 9.98201722e-05 9.85587467e-05 9.99318290e-05
9.96160597e-05]
1 | 1.8097 30.29 | 1.8162 29.30 | [ 3.26903159e-04 1.02809659e-04 9.72883208e-05 1.00247969e-04
3.85776628e-04]
2 | 1.3516 51.43 | 1.3484 51.23 | [ 1.01430411e-03 1.24375743e-04 9.68302775e-05 1.03850267e-04
9.58596996e-04]
3 | 0.9985 64.64 | 1.0092 64.29 | [ 1.74570677e-03 1.65856851e-04 9.74966897e-05 1.08754073e-04
1.41445035e-03]
4 | 0.8686 69.93 | 0.8962 69.18 | [ 2.29718839e-03 2.13767154e-04 9.87959938e-05 1.12449190e-04
1.66251149e-03]
5 | 0.8014 71.97 | 0.8316 70.58 | [ 0.00281981 0.0002632 0.00010048 0.0001162 0.00182495]
6 | 0.6734 76.97 | 0.7217 75.12 | [ 0.00330237 0.00031097 0.00010243 0.00012026 0.00197521]
7 | 0.6264 78.06 | 0.6917 75.84 | [ 0.00370885 0.00035571 0.00010465 0.00012405 0.00208244]
8 | 0.5853 79.81 | 0.6569 76.91 | [ 0.00410107 0.00039978 0.00010712 0.00012823 0.00219946]
9 | 0.5530 80.84 | 0.6362 77.81 | [ 0.00446913 0.00044372 0.00010966 0.00013251 0.00230016]
10 | 0.5023 82.52 | 0.6141 78.82 | [ 0.00479789 0.00048589 0.00011249 0.00013685 0.00239293]
20 | 0.2867 90.16 | 0.5331 82.25 | [ 0.00767433 0.00086004 0.0001453 0.00018783 0.00332006]
30 | 0.2150 92.62 | 0.5707 81.98 | [ 0.00983941 0.00116313 0.00018086 0.00024538 0.0041818 ]
40 | 0.1289 95.75 | 0.5588 83.51 | [ 0.01138892 0.00140368 0.00021302 0.00030274 0.00486754]
50 | 0.1054 96.45 | 0.6010 82.66 | 0.6376 82.16 | [ 0.01270547 0.00158029 0.00023854 0.00035376 0.00533099]
60 | 0.0781 97.42 | 0.6195 83.52 | [ 0.01353354 0.00171668 0.0002592 0.00039857 0.00571775]
70 | 0.0613 98.02 | 0.6183 84.15 | [ 0.01428551 0.00181435 0.0002746 0.0004356 0.00600168]
80 | 0.0503 98.34 | 0.6485 83.61 | [ 0.01490853 0.00188621 0.00028579 0.00046418 0.00625681]
90 | 0.0362 98.84 | 0.6470 84.12 | [ 0.01536294 0.00192372 0.00029251 0.00048463 0.00649806]
100 | 0.0350 98.89 | 0.6607 84.39 | 0.7276 82.61 | [ 0.01575197 0.00195524 0.00029775 0.0005022 0.00669031]
110 | 0.0356 98.76 | 0.6885 84.05 | [ 0.01608226 0.00197792 0.00030151 0.00051539 0.0068945 ]
120 | 0.0322 98.97 | 0.6661 83.73 | [ 0.01628539 0.00198904 0.00030353 0.00052381 0.00700189]
130 | 0.0420 98.59 | 0.7081 83.38 | [ 0.01642795 0.00197885 0.0003025 0.00052707 0.00713007]
140 | 0.0247 99.26 | 0.6623 84.11 | [ 0.01664047 0.00197916 0.00030224 0.00053086 0.0072478 ]
150 | 0.0287 99.10 | 0.6791 83.89 | 0.7080 83.44 | [ 0.01677389 0.00197238 0.00030139 0.00053334 0.00732648]
160 | 0.0364 98.81 | 0.7022 83.30 | [ 0.01694163 0.00197058 0.00030064 0.00053494 0.00744069]
170 | 0.0280 99.03 | 0.7221 84.01 | [ 0.01700905 0.00196512 0.0002996 0.00053515 0.00760183]
180 | 0.0246 99.25 | 0.6886 84.34 | [ 0.01710117 0.00195285 0.00029788 0.00053397 0.00771085]
190 | 0.0216 99.31 | 0.6991 84.45 | [ 0.01713888 0.00194032 0.00029546 0.00053045 0.00779966]
# NT = 10000
200 | 0.0216 99.31 | 0.6991 84.45 | 0.7259 83.59
### ID: 20150913-110837
real 164m58.645s
user 144m18.839s
sys 28m12.878s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.