Given a Tensor containing a set of padded sequences with shape B x P + 1, where the + 1 is a column containing the lens of the sequences, how can I find the mean of each sequence? Thanks in advance.

edit - Please note, that the padded elements are non-zero since they result from a previous embedding step