I am trying to use the hidden layer result to generate heatmap with libtorch jit
The code snippet is shown below:

image838×245 15 KB

The return value of the model should be two parameters, such as hidden_output and predict_result.
From some materials online, it seems that toTensorList() function is an appropriate choice for multiple return values based on the discussion at convert-c10-ivalue-to-tensor-or-tuple-failed 3.
I try to use toTensorList() but I came across the “std ambiguous” problem.
This error is resolved by adding the ":: " to the beginning of "std::" based on the discussion at compiler-report-std-ambiguous-symbol-error-under-visual-c-2017 3
However, the exception problem keeps occurring which is very confused to me. Is there any solution to this problem?
Thank you very much for your attention to this problem.