Batch of different length inputs

I have point cloud data for 3d object detection. Each object may contain different no of points. How should I create batch for training? Should I pad with 0 for the samples having less points?

Padding/masking are sometimes used. Eventually we’ll have support for nested tensors. There’s some discussion of the problem here with some of the workarounds typically employed: