import tensorflow as tf

    def regularization(self):
        return self.model_lam * (
            self.model_prob * tf.reduce_sum(tf.square(self.model_W)) +
            tf.reduce_sum(tf.square(self.model_b))
