def __init__(self, lfunc, summary=True, name="loss"):
        """Constructor.

        Parameters
        ----------

        lfunc : str
            Loss function type. Types supported:
            "cross_entropy", "softmax_cross_entropy" and "mse".

        summary : bool, optional (default = True)
            Whether to attach a tf scalar summary to the op.

        name : str, optional (default = "loss")
            Name for the loss op.
        """
        assert lfunc in ["cross_entropy",
                         "softmax_cross_entropy",
                         "mse"]

        self.lfunc = lfunc
        self.summary = summary
        self.name = name
Constructor.

        Parameters
        ----------

        lfunc : str
            Loss function type. Types supported:
            "cross_entropy", "softmax_cross_entropy" and "mse".

        summary : bool, optional (default = True)
            Whether to attach a tf scalar summary to the op.

        name : str, optional (default = "loss")
            Name for the loss op.
        
yadlt/core/trainers.py