Exemple #1
0
if save_output:

    for f in os.listdir(exp_dir):
        if 'exp_stdout.txt' in f:
            os.remove(exp_dir + f)

    write_to_file = exp_dir + 'exp_stdout.txt'
###########################################################################################

###########################################################################################
# LOAD DATA

if args.dataset == 'clevr':
    # # CLEVR DATA
    dataset = load_clevr(batch_size=args.batch_size,
                         vws=args.vws,
                         quick=args.quick)

elif args.dataset == 'cifar':
    # CIFAR DATA
    # train_image_dataset = load_cifar(data_dir=args.data_dir)
    dataset = load_cifar(data_dir=home + '/Documents/')

print(len(dataset), dataset[0].shape)
###########################################################################################

###########################################################################################
# Init Model
# ------------------------------------------------------------------------------
sampling_batch_size = 64
shape = dataset[0].shape
Exemple #2
0
    write_to_file = exp_dir + 'exp_stdout.txt'
###########################################################################################

###########################################################################################
# LOAD DATA
print('\nLoading Data')
if args.dataset == 'clevr':

    # # CLEVR DATA
    if args.machine in ['vws', 'vector', 'vaughn']:
        data_dir = home + "/vl_data/two_objects_large/"  #vws
    else:
        data_dir = home + "/VL/data/two_objects_no_occ/"  #boltz

    train_x, test_x = load_clevr(batch_size=args.batch_size,
                                 data_dir=data_dir,
                                 quick=args.quick)
    shape = train_x[0].shape

elif args.dataset == 'cifar':
    # CIFAR DATA
    # train_image_dataset = load_cifar(data_dir=args.data_dir)
    train_x, test_x = load_cifar(data_dir=home + '/Documents/',
                                 dataset_size=args.dataset_size)
    shape = train_x[0].shape

    # print (len(test_x), 'test set len')
    svhn_test_x = load_svhn(data_dir=home + '/Documents/')
    # svhn_test_x = test_x

# dataset = train_x