The documentation for extending pytorch has this to say about inputting list or dicts to autograd functions:
“All kinds of Python objects are accepted here. Tensor arguments that track history (i.e., with
requires_grad=True) will be converted to ones that don’t track history before the call, and their use will be registered in the graph. Note that this logic won’t traverse lists/dicts/any other data structures and will only consider Tensor s that are direct arguments to the call.”
I am interested in creating an autograd function which accepts a list of Tensors that track history which are used in the computation. The quoted documentation suggests that I would need to manually make sure that those Tensors are added to the computation graph. Is there an example of how to do this anywhere? I can’t seem to find one.