MCPcopy Index your code
hub / github.com/pytorch/tutorials / fn

Function fn

intermediate_source/forward_ad_usage.py:39–40  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

37tangent = torch.randn(10, 10)
38
39def fn(x, y):
40 return x ** 2 + y ** 2
41
42# All forward AD computation must be performed in the context of
43# a ``dual_level`` context. All dual tensors created in such a context

Callers 4

check_clFunction · 0.70
timedFunction · 0.70
timedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected