BEV modules¶
- class torch_lattice.nn.modules.bev.ToBEVConvolution(in_channels, out_channels, n_kernels, stride=1, dim=3, bias=False)[source]¶
Bases:
ModuleConverts a SparseTensor into a sparse BEV feature map.
- extra_repr()[source]¶
Return the extra representation of the module.
To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
- forward(input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.- Return type:
- Parameters:
input (SparseTensor)
- class torch_lattice.nn.modules.bev.ToBEVReduction(dim=3)[source]¶
Bases:
Module- Parameters:
dim (int)
- extra_repr()[source]¶
Return the extra representation of the module.
To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
- forward(input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.- Return type:
- Parameters:
input (SparseTensor)
- class torch_lattice.nn.modules.bev.ToDenseBEVConvolution(in_channels, out_channels, shape, offset=(0, 0, 0), dim=3, bias=False)[source]¶
Bases:
ModuleConverts a SparseTensor into a dense BEV feature map.
Group points with the same z value together and apply the same FC kernel. Aggregate the results by summing up all features within one BEV grid. .. note:: This module consumes larger memory than ToBEVHeightCompression.
- Parameters:
in_channels (
int) – Number of input channelsout_channels (
int) – Number of output channelsshape (
List[int] |Tuple[int,int,int] |Tensor) – Shape of BEV mapdim (
int) – Coordinate dimension index for z. Coordinates are ordered (batch, x, y, z), so the default is 3.bias (
bool) – Whether to use bias
- extra_repr()[source]¶
Return the extra representation of the module.
To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
- forward(input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.- Return type:
- Parameters:
input (SparseTensor)
- class torch_lattice.nn.modules.bev.ToBEVHeightCompression(channels, shape, offset=(0, 0, 0), dim=3)[source]¶
Bases:
ModuleConverts a SparseTensor to a flattened volumetric tensor.
- Parameters:
- extra_repr()[source]¶
Return the extra representation of the module.
To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable.
- Return type:
- forward(input)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.- Return type:
- Parameters:
input (SparseTensor)