When using laserembeddings with PyTorch >= 1.4.0, you might sometimes get a warning like this:
The number of elements in the out tensor of shape [...] is [...] which does not match the computed number of elements [...]. Note that this may occur as a result of rounding error. The out tensor will be resized to a tensor of shape ([...]).
When using laserembeddings with PyTorch >= 1.4.0, you might sometimes get a warning like this:
Related to: https://github.com/pytorch/pytorch/issues/28347, https://github.com/pytorch/pytorch/pull/29195.
This PR fixes a util function in the encoder that would sometimes cause this warning to appear.