My Siammask network is used for object tracking. There are two input arguments in my network, one is target object and the other one is search domain. I hope to use libtorch, but i dont’t know how can I use jit.trace() funciton in Pytorch to save it . I referred some blog and docs but could not find a method for double input args about jit.trace() function. Cound anyone meet the similar situation?
torch.jit.trace() takes in the function to trace and a tuple of example inputs, so you can pass as many inputs as your model needs.
See Tracing for more details, does this fix your issue?