import tensorflow as tf

    '''
    def create_custom_regularizers(self):
        # should not be an empty list
        return [0.]
    '''

    # save in self.regularizers the regularizers of the model
    def create_regularizers_and_updates(self):

        wb_regularizers = tf.get_collection(tf.GraphKeys.REGULARIZATION_LOSSES)
        # see keras_utils.py: activity_and_contractive_regularizers
        ac_regularizers = tf.get_collection(AC_REGULARIZATION)
        # if (not wb_regularizers) and (not ac_regularizers):
        #     wb_regularizers = [tf.constant(0.)]

        #import pdb;pdb.set_trace()
        if len(wb_regularizers)>0:
            self.regularizers += wb_regularizers
