In [1]:
import theano.sandbox.cuda.basic_ops as sbcuda
import numpy as np
# import pandas as pd
import theano
import theano.tensor as T
import layers
import cc_layers
import custom
import load_data
import realtime_augmentation as ra
import time
import csv
import os
import cPickle as pickle
from datetime import datetime, timedelta


cuda_available starts with True 
cuda_available True 
Mapped name None to device cuda: GeForce GT 730
PCI Bus ID: 0000:01:00.0
Using cuDNN version 5110 on context None

In [8]:
ANALYSIS_PATH = "analysis/final/try_convnet_Christmas1.pkl"
analysis = np.load(ANALYSIS_PATH)
w =  analysis['param_values']

In [13]:
print len(w)
print 
for i in w:
    print len(i)


14

2048
37
2048
4096
4096
4096
128
128
64
128
32
64
3
32

In [17]:
for i in range(len(w)):
    print type(w[i])
    print np.shape(w[i])


<type 'numpy.ndarray'>
(2048, 37)
<type 'numpy.ndarray'>
(37,)
<type 'numpy.ndarray'>
(2048, 4096)
<type 'numpy.ndarray'>
(4096,)
<type 'numpy.ndarray'>
(4096, 4096)
<type 'numpy.ndarray'>
(4096,)
<type 'numpy.ndarray'>
(128, 3, 3, 128)
<type 'numpy.ndarray'>
(128, 4, 4)
<type 'numpy.ndarray'>
(64, 3, 3, 128)
<type 'numpy.ndarray'>
(128, 6, 6)
<type 'numpy.ndarray'>
(32, 5, 5, 64)
<type 'numpy.ndarray'>
(64, 16, 16)
<type 'numpy.ndarray'>
(3, 6, 6, 32)
<type 'numpy.ndarray'>
(32, 40, 40)

In [21]:
w_pairs=[]
for i in range(len(w)/2):
    w_pairs.append([w[2*i],w[2*i+1]])

In [26]:
for i in range(len(w_pairs)):
    print type(w_pairs[i])
    print np.shape(w_pairs[i][0])
    print np.shape(w_pairs[i][1])


<type 'list'>
(2048, 37)
(37,)
<type 'list'>
(2048, 4096)
(4096,)
<type 'list'>
(4096, 4096)
(4096,)
<type 'list'>
(128, 3, 3, 128)
(128, 4, 4)
<type 'list'>
(64, 3, 3, 128)
(128, 6, 6)
<type 'list'>
(32, 5, 5, 64)
(64, 16, 16)
<type 'list'>
(3, 6, 6, 32)
(32, 40, 40)

In [27]:
a=w_pairs.pop()
print np.shape(a[0])
print np.shape(a[1])


(3, 6, 6, 32)
(32, 40, 40)

In [ ]: