I would like to call a different function when tracing. I have registered it through
torch::jit::RegisterOperators() and had to change it a little for that, so would like to call it only if it is tracing.
Is there a way to find if the module is being traced?
I currently rely on the fact that tenssor.shape[0] is a tensor while tracing, but an int otherwise. That is not the best way.
Something like torch.jit.is_running