MCPcopy Create free account
hub / github.com/Gabesarch/ICAL / gridcloud3d

Function gridcloud3d

TEACh/utils/basic.py:130–139  ·  view source on GitHub ↗
(B, Z, Y, X, norm=False)

Source from the content-addressed store, hash-verified

128 return tensor
129
130def gridcloud3d(B, Z, Y, X, norm=False):
131 # we want to sample for each location in the grid
132 grid_z, grid_y, grid_x = meshgrid3d(B, Z, Y, X, norm=norm)
133 x = torch.reshape(grid_x, [B, -1])
134 y = torch.reshape(grid_y, [B, -1])
135 z = torch.reshape(grid_z, [B, -1])
136 # these are B x N
137 xyz = torch.stack([x, y, z], dim=2)
138 # this is B x N x 3
139 return xyz
140
141def gridcloud2d(B, Y, X, norm=False):
142 # we want to sample for each location in the grid

Calls 1

meshgrid3dFunction · 0.85

Tested by

no test coverage detected