def setUp(self):

        #Parameter initializations
        self.test_data_path = 'test_mat_data/'
        params['test_mode'] = True
        paths['image'] = paths['home'] + 'data/'
        paths['map'] = paths['home'] + 'map-test/'
        #params['s']['n_iter'] = 1000
        params['c']['n_iter'] = 1000

        #layer_lgn.compute_layer()
        layer_s1.layer_s1()
Exemple #2
0
    def setUp(self):
        
        #Parameter initializations
        self.test_data_path = 'test_mat_data/'
        params['test_mode'] = True
        paths['image'] = paths['home'] + 'data/'
        paths['map'] = paths['home'] + 'map-test/'
        #params['s']['n_iter'] = 1000
        params['c']['n_iter'] = 1000

        #layer_lgn.compute_layer()
        layer_s1.layer_s1()
Exemple #3
0
def l_s1():
    '''Computer Layer S1 of the network'''

    tmp_lgn = load(paths['map'] + 'onoff.0.0.npy')
    count = ceil(float(len(tmp_lgn)) / params['c']['block'])
    if count == 0:
        count = 1
    exists = zeros((count), bool)
    
    for block in range(count):
        if os.path.isfile(paths['map'] + 's1.' + str(block) + '.' + \
                          params['s']['type'] + '.npy'):
            exists[block] = True        
            
    #If not then compute
    if not exists.all():
        layer_s1.layer_s1()
def l_s1():
    '''Computer Layer S1 of the network'''

    tmp_lgn = load(paths['map'] + 'onoff.0.0.npy')
    count = ceil(float(len(tmp_lgn)) / params['c']['block'])
    if count == 0:
        count = 1
    exists = zeros((count), bool)

    for block in range(count):
        if os.path.isfile(paths['map'] + 's1.' + str(block) + '.' + \
                          params['s']['type'] + '.npy'):
            exists[block] = True

    #If not then compute
    if not exists.all():
        layer_s1.layer_s1()