I have struggled with the problem several days.
Now I implemented torch.nn.utils.rnn.pack_padded_sequence with variable batch size and sequence length. The model is already trained and work fine in python. I want to embed it in my c++ project. I used torch.jit.script but it always inform me that
for operator (Tensor 0, Tensor 1, Tensor 2) -> Tensor:
expected a value of type Tensor for argument ‘2’ but found bool
I changed the batch_first to tensor.ones() and in forward prediction, it informs me that
argument ‘batch_first’ (position 3) must be bool
it is really ridiculous. And most examples online are trace implementation.
Can somebody help me or give me some hints?
Thx a lot!