You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
As mentioned in this issue #2535 we are looking to convert a custom version of enc-dec architecture. We want to pass the encoder output to the decoder in some way, to do so we need to slice some tensors in the dec. However, these tensors have at least one dynamic dimension (which is the batch size dimension).
What is the correct way to slice a tensor with a dynamic shape?
@yuekaizhang Thank you for your quick response.
Unfortunately, both links are irrelevant for our case as we need to slice output tensors of intermediate decoder layers. Could you please direct us to someone who can assist us?
I have a follow-up question let's say that we fix all dimensions including the batch in prepare_inputs function. what is the correct way to slice a tensor?
use slice from tensorrt_llm.functional and use it as part of the module's forward function.
Add the relevant slice layer to the network using add_slice method.
Hi,
As mentioned in this issue #2535 we are looking to convert a custom version of enc-dec architecture. We want to pass the encoder output to the decoder in some way, to do so we need to slice some tensors in the dec. However, these tensors have at least one dynamic dimension (which is the batch size dimension).
What is the correct way to slice a tensor with a dynamic shape?
@yuekaizhang maybe you can help here?
Cheers,
The text was updated successfully, but these errors were encountered: