Example #1
0
        "location": data_loc,  # some location to load from.  
        "height": 32,
        "width": 32,
        "channels": 3,
        "batches2test": 2,
        "batches2train": 10,
        "mini_batches_per_batch": (10, 10, 10),
        "batches2validate": 2,
        "mini_batch_size": 500
    }

    # setup incremental dataset parameters dataset.
    temp_splits = {"shot": [6, 7, 8, 9], "base": [0, 1, 2, 3, 4, 5], "p": 0}

    temp_base_data = inc_dataset(splits=temp_splits,
                                 data_params=temp_data_params,
                                 location=data_loc,
                                 verbose=1)
    temp_base_data = temp_base_data.dataset_location()
    site2 = igan(init_dataset=temp_base_data, root=root, verbose=1)

    print(". Setup transfered gan network from site 1.")
    gan_params = load(site_1_root + '/resultor/gan/params/epoch_' + str(gan) +
                      '.pkl')
    site2.setup_gan(dataset=temp_base_data,
                    root=root,
                    params=gan_params,
                    cook=False,
                    verbose=1)

    print(". Setup transfered base network from site 1.")
    base_params = load(site_1_root +
Example #2
0
    site_1_root = 'records/site_1'
    root = 'records/site_2/gan_' + str(gan)
    if not os.path.exists(root):
        os.makedirs(root)

    lr = (0.00005, 0.01, 0.0001)
    epochs = (40, 40)

    p_vals = [0, 10, 50, 100, 500, 1000, 2500, 4700]
    #p_vals = [0]
    # setup incremental dataset parameters dataset.
    """temp_splits = { "shot"               : [6,7,8,9],
                    "base"               : [0,1,2,3,4,5],    
                    "p"                  : 0   }"""

    temp_base_data = inc_dataset(  #splits = temp_splits, 
        verbose=1)
    temp_base_data = temp_base_data.dataset_location()
    site2 = igan(init_dataset=temp_base_data, root=root, verbose=1)

    print(". Setup transfered gan network from site 1.")
    gan_params = load(site_1_root + '/resultor/gan/params/epoch_' + str(gan) +
                      '.pkl')
    site2.setup_gan(dataset=temp_base_data,
                    root=root,
                    params=gan_params,
                    cook=False,
                    verbose=1)

    print(". Setup transfered base network from site 1.")
    base_params = load(site_1_root +
                       '/resultor/base-network/params/epoch_99.pkl')
Example #3
0
    if not os.path.exists(root):
        os.makedirs(root)           

    lr = (0.04, 0.001, 0.0001)    
    epochs =(30, 15)

    p_vals = [0, 10, 50, 100, 500, 2000]
    temperature = 8 # High temperature for CIFAR 10.

    # setup incremental dataset parameters dataset.
    temp_splits = { "shot"               : [6,7,8,9],
                    "base"               : [0,1,2,3,4,5],    
                    "p"                  : 0   }  

    temp_base_data = inc_dataset (splits = temp_splits, 
                                    location = '/home/ASUAD/rvenka10/airlock', 
                                        verbose = 1)

    temp_base_data = temp_base_data.dataset_location()  
    site2 = igan ( init_dataset = temp_base_data, root = root, verbose = 1 )

    print (". Setup transfered gan network from site 1.")
    gan_params = load(site_1_root + '/resultor/gan/params/epoch_' + str(gan) +'.pkl')
    site2.setup_gan(dataset = temp_base_data,
                    root = root, 
                    params = gan_params, 
                    cook = False,
                    verbose = 1)

    print (". Setup transfered base network from site 1.")    
    base_params = load(site_1_root + '/resultor/base-network/params/epoch_29.pkl')