• Darijan Gudelj's avatar
    packed_to_padded now accepts all sizes · f34da3d3
    Darijan Gudelj authored
    Summary:
    We need to make packing/unpacking in 2 places for mixed frame raysampling (metrics and raysampler) but those tensors that need to be unpacked/packed have more than two dimensions.
    I could have reshaped and stored dimensions but this seems to just complicate code there with something which packed_to_padded should support.
    I could have made a separate function for implicitron but it would confusing to have two different padded_to_packed functions inside pytorch3d codebase one of which does packing for (b, max) and (b, max, f) and the other for (b, max, …)
    
    Reviewed By: bottler
    
    Differential Revision: D39729026
    
    fbshipit-source-id: 2bdebf290dcc6c316b7fe1aeee49bbb5255e508c
    f34da3d3
test_packed_to_padded.py 10.5 KB