def mlp_func(self): func = self._config.get('Functions', 'mlp_func') if func == 'identity': return tf.identity else: return getattr(tf.nn, func)