def return_function(self, name):
     dataset = dir_path.split('/')[1] 
     self.label = name + '-OCR-noisy'
     if recordsExists(self.file, dataset, self.label, self.severity, self.noise_type):
         return
     
     status, score =  getattr(self, 'if_' + name)()
     compute_time = time() - self.start
     bag = (self.file, dataset, self.label, self.severity, self.noise_type, status, score, compute_time, self.actual_str, self.detected_str)
     writeToDB(bag)
                                     x_test_max.shape[0], MAX_TESTING)

    print("Number of Training Samples: X={}, Y={}".format(
        x_train.shape[0], y_train.shape[0]))
    print("Number of Validation Samples: X={}, Y={}".format(
        x_val.shape[0], y_val.shape[0]))
    print("Number of Test Samples: X={}, Y={}".format(x_test.shape[0],
                                                      y_test.shape[0]))

    testing_optimizers = ['RAdam', 'Adam', 'NAdam', 'SGD']
    testing_activations = ['tanh', 'relu', 'selu']

    for optimizer in testing_optimizers:
        for activation in testing_activations:

            if recordsExists((architecture, label, optimizer, activation)):
                print(
                    "Continuing for Optimizer = {} and Activation = {}".format(
                        optimizer, activation))
                continue

            loss, accuracy, mae, mse = {}, {}, {}, {}
            train_loss_dict, train_accuracy_dict, train_mae_dict, train_mse_dict = {}, {}, {}, {}

            if optimizer == 'RAdam':
                score_returned, history = diff_optimizer(RAdam(lr=0.05),
                                                         activation,
                                                         label='RAdam')
            else:
                score_returned, history = diff_optimizer(optimizer, activation)