def test_item(t: Tensor) -> float: t = t.sum() return t.item()
def f(x: Tensor) -> Tuple[Tensor, Tuple[Tensor, Tensor]]: x = x.square() return x.sum(), (x, x + 1)
def test_item(t: Tensor) -> float: t = t.sum() return t.item()
def f(x: Tensor) -> Tuple[Tensor, Tuple[Tensor, Tensor]]: x = x.square() return x.sum(), (x, x + 1)