I converted nn.Module with torch.jit.script and saved it in .pt format.
The forward function in that module has an Int argument.
def forward(self, x: Tensor, id : int) -> Tensor:
print(id)
x = self._forward(x)
return x
When I load the module in c++, I pass the Tensor like this,
std::vector<torch::jit::IValue> inputs;
inputs.push_back(torch::ones({1, 3, 224, 224}));
at::Tensor output = module.forward(inputs).toTensor();
but how should I write it for Int? Which struct should I use?