コード例 #1
0
def create_gens(train, test):

    gen, test_gen = None, None

    if train != None:
        gen = IQ_Generator(data_points=train,
                           dim=input_dims,
                           batch_size=bs,
                           n_classes=1,
                           shuffle=True,
                           augment=True,
                           distort=False,
                           dist_scale=.05,
                           flip=False,
                           permute=False,
                           gauss_noise=.001,
                           rand_seg_remove=3)

    if test != None:
        test_gen = IQ_Generator(data_points=test,
                                dim=input_dims,
                                batch_size=1,
                                n_classes=1,
                                shuffle=False,
                                augment=False)

    if gen != None and test_gen != None:
        return gen, test_gen

    elif gen != None:
        return gen

    elif test_gen != None:
        return test_gen
コード例 #2
0
def create_test_gen(test):

    test_gen = IQ_Generator(data_points=test,
                            dim=input_dims,
                            batch_size=1,
                            n_classes=1,
                            shuffle=False,
                            augment=False)

    return test_gen
コード例 #3
0
ファイル: IQ_test.py プロジェクト: sahahn/GenDiagFramework
def create_gens(train, test):
    
   gen = IQ_Generator(data_points = train,
                 dim=input_dims,
                 batch_size = bs,
                 n_classes = 1,
                 shuffle = True,
                 augment = False,
                 distort = False,
                 dist_scale = .15,
                 permute = False,
                 gauss_noise = .01
                 )

   test_gen = IQ_Generator(data_points = test,
                 dim=input_dims,
                 batch_size = bs,
                 n_classes = 1,
                 shuffle = False,
                 augment = False)
   
   return gen, test_gen
コード例 #4
0
def create_train_gen(train):

    gen = IQ_Generator(data_points=train,
                       dim=input_dims,
                       batch_size=bs,
                       n_classes=1,
                       shuffle=False,
                       augment=False,
                       distort=True,
                       dist_scale=.05,
                       gauss_noise=.001,
                       rand_seg_remove=0)

    return gen