def build_database(self, dataset, learning_rule, learning_method, model):
        save_to_database = {'name' : self.state.log.save_to_database_name,
                            'records' : {'Dataset'          : dataset.__class__.__name__,
                                         'max_col_norm'     : learning_rule.max_col_norm,
                                         'Weight_Init_Seed' : model.rand_seed,
                                         'Dropout_Below'    : str([layer.dropout_below for layer in model.layers]),
                                         'Learning_Method'  : learning_method.__class__.__name__,
                                         'Batch_Size'       : dataset.batch_size,
                                         'Dataset_Noise'    : dataset.noise.__class__.__name__,
                                         'Dataset_Dir'      : dataset.data_dir,
                                         'Feature_Size'     : dataset.feature_size(),
                                         'nblocks'          : dataset.nblocks(),
                                         'Layer_Types'      : str([layer.__class__.__name__ for layer in model.layers]),
                                         'Layer_Dim'        : str([layer.dim for layer in model.layers]),
                                         'Preprocessor'     : dataset.preprocessor.__class__.__name__,
                                         'Training_Cost'    : learning_rule.cost.type,
                                         'Stopping_Cost'    : learning_rule.stopping_criteria['cost'].type}
                            }

        if learning_method.__class__.__name__ == "SGD":
            save_to_database["records"]["Learning_rate"] = learning_method.learning_rate
            save_to_database["records"]["Momentum"]    = learning_method.momentum
        elif learning_method.__class__.__name__ == "AdaGrad":
            save_to_database["records"]["Learning_rate"] = learning_method.learning_rate
            save_to_database["records"]["Momentum"]    = learning_method.momentum
        elif learning_method.__class__.__name__ == "AdaDelta":
            save_to_database["records"]["rho"] = learning_method.rho
            save_to_database["records"]["eps"] = learning_method.eps
        else:
            raise TypeError("not SGD, AdaGrad or AdaDelta")

        layer_noise = []
        layer_noise_params = []
        for layer in model.layers:
            layer_noise.append(layer.noise.__class__.__name__)
            if ['BlackOut', 'MaskOut', 'BatchOut'] in layer.noise.__class__.__name__:
                layer_noise_params.append(layer.noise.ratio)

            elif layer.noise.__class__.__name__ is 'Gaussian':
                layer_noise_params.append((layer.noise.mean, layer.noise.std))

            else:
                layer_noise_params.append(None)

        save_to_database["records"]["Layer_Noise"] = str(layer_noise)
        save_to_database["records"]["Layer_Noise_Params"] = str(layer_noise_params)

        return save_to_database
dataset/ETHPy150Open hycis/Pynet/hps/deprecated/AE.py/AE.build_database/swapped operands of `in`