Hi,
I have traced and saved a model that gives as output a python namedtuple. How do I go about accessing the fields of this output in the C++ api?
For eg -
from collections import named_tuple
NT = namedtuple(‘NT’, [‘output1’, ‘output2’])
def f(x):
output_tuple = NT(x * 2, x / 2)
return output_tuple
I am able to trace and save the above function using torch.jit.trace and would like to index into this output using the keyword arguments for NT in C++.
Thanks