@classmethod
    def from_any(cls, arg):
        if isinstance(arg, Loss):
            return arg
        elif isinstance(arg, str):
            if arg == 'softmaxce':
                return SoftmaxCrossEntropy()
            elif arg == 'bce':
                return BinaryCrossEntropy()
            elif arg == 'mse':
                return MeanSquaredError()
        raise ValueError(arg % 'Invalid constructor arguments: %s')
dataset/ETHPy150Open andersbll/deeppy/deeppy/loss.py/Loss.from_any/swapped operands of `%`