Huahuan Zheng

Results 35 comments of Huahuan Zheng

I also post on pytorch forum, which might be more clear. https://discuss.pytorch.org/t/efficient-way-to-multiply-two-tensor-with-different-lengths/132029

Thank you for your reply! Autograd is not required. But I wonder if there is any way to avoid the slicing and copy of `A`? This might be somewhat off...

> @maxwellzh - So, effectively you need a segmented multiplication that you can pass lengths to avoid expanding memory. NestedTensor could do that for you, maybe via a function such...

Specifically, RNN-T loss with compact layout computes `costs` with respect to each sequence, so `costs` is of shape `(N,)`. In the backward pass, we need to multiply `grad_costs` to get...

Just correct me if I misunderstand. Aren't the lengths always required in this case? Without lengths, it's impossible to tell the start position of each sequence in the compact layout....