Hi all,
I am a beginner user of PyTorch. As mentioned in the title, my question is: how can I  get the function type in Functional module in C++ API? For example, if there are two activation modules in my network:
torch::nn::Functional activ1(torch::relu)
torch::nn::Functional activ2(torch::tanh)
Then I pass each of them to another procedure, say void print_name(torch::nn::Module &m) which print the name of current module, then how can I know that activ1 is ReLU and activ2 is Tanh? I try to call the name() but both of them only return “torch::nn::Functional”…
BTW: Is there any way that I can override their module name? If this works then it can also indirectly resolve my question.
Thanks in advance!