def __init__(self): """Initialise base fitness function class and its variables. """ super().__init__() self.num_obj = 2 dummyfit = base_ff() dummyfit.maximise = True self.fitness_functions = [dummyfit, dummyfit] self.default_fitness = [-1, -1] t = time.localtime() current_time = time.strftime("%H-%M-%S", t) self.filename = current_time + ".txt" in_file = "../data/haralick02_50K.csv" df = pd.read_csv(in_file) df.sort_values(by=['Label'], inplace=True) haralick_features = [] for i in range(104): feature = "x" + str(i) haralick_features.append(feature) self.data = df[haralick_features] self.labels = df['Label'] self.training = self.data self.test = self.data self.n_vars = len(self.data) self.test1 = 0 self.test2 = 0
def __init__(self): super().__init__() self.num_obj = 2 fit = base_ff() fit.maximise = True self.fitness_functions = [fit, fit] self.default_fitness = [float('nan'), float('nan')]
def __init__(self): super().__init__() self.filename = '/pesquisa/phenotypes.csv' self.num_obj = 2 fit = base_ff() fit.maximise = True self.fitness_functions = [fit, fit] self.default_fitness = [float('nan'), float('nan')]
def __init__(self): super().__init__() self.num_obj = 2 fit = base_ff() fit.maximise = True self.fitness_functions = [fit, fit] self.default_fitness = [float('nan'), float('nan')] tpu = tf.distribute.cluster_resolver.TPUClusterResolver.connect() tpu_strategy = tf.distribute.experimental.TPUStrategy(tpu) self.tpu_strategy = tpu_strategy
def __init__(self): # Initialise base fitness function class. super().__init__() # Set list of individual fitness functions. self.num_obj = 2 dummyfit = base_ff() dummyfit.maximise = True self.fitness_functions = [dummyfit, dummyfit] self.default_fitness = [float('nan'), float('nan')]
def __init__(self): # Initialise base fitness function class. super().__init__() test_set = face(['./deeplearn/test.hdf5']) train_set = face(['./deeplearn/train.hdf5']) self.test_loader = DataLoader(test_set, shuffle=False, batch_size=32, num_workers=1) self.train_loader = DataLoader(train_set, batch_size=32, shuffle=False, num_workers=1, pin_memory=True) # Set list of individual fitness functions. self.num_obj = 2 dummyfit = base_ff() dummyfit.maximise = True self.fitness_functions = [dummyfit, dummyfit] self.default_fitness = [float('nan'), float('nan')]