torch2trt icon indicating copy to clipboard operation
torch2trt copied to clipboard

Support list and pack_padded_sequence as input

Open biggytruck opened this issue 4 years ago • 4 comments

Currently my PyTorch model has the following inputs:

  • A tensor with size (B, 1, 300) where B is the batch size
  • A list of pack_padded_sequence objects, each of which has size (T, B, 300) where T is the maximum length among the batch and B is the batch size.

When I tried to convert the model from Pytorch to TensorRT, I got the error: AttributeError: 'list' object has no attribute 'clone'

I also tried to retrieve each pack_padded_sequence object from the list and pass them one by one into the model, but got: AttributeError: 'list' object has no attribute 'clone'.

Is it possible to support list or pack_padded_sequence as model input?

biggytruck avatar Jun 16 '20 00:06 biggytruck

Hello @biggytruck did you find any solution to this problem? I am having same issue. Thanks.

cognitiveRobot avatar Sep 21 '20 10:09 cognitiveRobot

same issue +1

shatealaboxiaowang avatar Apr 23 '21 02:04 shatealaboxiaowang

+1

pramodhrachuri avatar Jul 18 '21 23:07 pramodhrachuri

+1

Quinn1876 avatar Mar 30 '22 20:03 Quinn1876