MCPcopy Create free account
hub / github.com/pytorch/tutorials / func_params_only

Function func_params_only

intermediate_source/forward_ad_usage.py:239–240  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

237# Because ``jvp`` requires every input to be associated with a tangent, we need to
238# create a new function that, when given the parameters, produces the output
239def func_params_only(params):
240 return func(params, buffers, input)
241
242model_output, jvp_out = ft.jvp(func_params_only, (params,), (tangents,))
243

Callers

nothing calls this directly

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected