Exemplo n.º 1
0
    def __neg__(self):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(_neg, self, None)
Exemplo n.º 2
0
    def __pos__(self):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.abs, self, None)
Exemplo n.º 3
0
    def __xor__(self, other: Any):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.bitwise_xor, self, other)
Exemplo n.º 4
0
    def __inv__(self):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.bitwise_not, self, None)
Exemplo n.º 5
0
    def __truediv__(self, other: Any):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.true_divide, self, other)
Exemplo n.º 6
0
    def __sub__(self, other: Any):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.sub, self, other)
Exemplo n.º 7
0
    def __rpow__(self, other: Any):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.pow, other, self)
Exemplo n.º 8
0
    def __rfloordiv__(self, other: Any):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        return CompositionalMetric(torch.floor_divide, other, self)
Exemplo n.º 9
0
    def __rand__(self, other: Any):
        from pytorch_lightning.metrics.compositional import CompositionalMetric

        # swap them since bitwise_and only supports that way and it's commutative
        return CompositionalMetric(torch.bitwise_and, self, other)