def __matmul__(self, other): if not torch.is_tensor(other): return NotImplemented return self.matmul(other)