Question 1: Single choice
mediumAI-checkedDeep Learning FrameworksA simple tracer, such as PyTorch's torch.jit.trace, runs a function once on an example input
and records the tensor operations that execute. Plain Python values, such as the outcome of an
if test, are frozen as constants, and no check on them is recorded. The function below is
traced with the example input torch.ones(3):
def f(x):
if x.sum() > 0:
return x * 2
return -x
What does the recorded graph return when it is then called with -torch.ones(3)?