Layers¶
The following layers have been simplified for torch.jit:
HomogeneousShapeLayer¶
-
class
HomogeneousShapeLayer(shapes, n_dims, use_cpp=False)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObjectModule to Perform a Shape Prediction (including a global homogeneous transformation)
HomogeneousTransformationLayer¶
-
class
HomogeneousTransformationLayer(n_dims: int, use_cpp=False)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObjectWrapper Class to Wrap the Python and C++ API into a combined python API
-
forward(shapes: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac49b0>, params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac49e8>)[source]¶ Selects individual parameters from
paramsand forwards them through the actual layer implementationParameters: - shapes (
torch.Tensor) – shapes to transform - params (
torch.Tensor) – parameters specifying the affine transformation
Returns: the transformed shapes in cartesian coordinates
Return type: torch.Tensor- shapes (
-
num_params¶
-
_HomogeneousTransformationLayerPy¶
-
class
_HomogeneousTransformationLayerPy(n_dims)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObjectModule to perform homogeneous transformations in 2D and 3D (Implemented in Python)
-
_ensemble_2d_matrix(rotation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4c50>, translation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4c88>, scale_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4cc0>)[source]¶ ensembles the homogeneous transformation matrix for 2D
Parameters: - rotation_params (
torch.Tensor) – parameters specifying the rotation (one parameter) - translation_params (
torch.Tensor) – parameters specifying the translation (two parameters) - scale_params (
torch.Tensor) – parameter specifying the global scaling factor (one parameter) (currently only isotropic scaling supported)
Returns: 2D transformation matrix
Return type: torch.Tensor- rotation_params (
-
_ensemble_3d_matrix(rotation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4cf8>, translation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4d30>, scale_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4d68>)[source]¶ ensembles the homogeneous transformation matrix for 3D
Parameters: - rotation_params (
torch.Tensor) – parameters specifying the rotation (three parameters) - translation_params (
torch.Tensor) – parameters specifying the translation (three parameters) - scale_params (
torch.Tensor) – parameter specifying the global scaling factor (one parameter) (currently only isotropic scaling supported)
Returns: 3D transformation matrix
Return type: torch.Tensor- rotation_params (
-
_ensemble_trafo(rotation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4ba8>, translation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4be0>, scale_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4c18>)[source]¶ ensembles the transformation matrix in 2D and 3D
Parameters: - rotation_params (
torch.Tensor) – parameters specifying the rotation (one per DoF) - translation_params (
torch.Tensor) – parameters specifying the translation (one per dimension) - scale_params (
torch.Tensor) – parameter specifying the global scaling factor (currently only isotropic scaling supported)
Returns: transformation matrix
Return type: torch.Tensor- rotation_params (
-
forward(shapes: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4a90>, rotation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4ac8>, translation_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4b00>, scale_params: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5843ac4b38>)[source]¶ ensembles the homogeneous transformation matrix and applies it to the shape tensor
Parameters: - shapes (
torch.Tensor) – shapes to transform - rotation_params (
torch.Tensor) – parameters specifying the rotation (one per DoF) - translation_params (
torch.Tensor) – parameters specifying the translation (one per dimension) - scale_params (
torch.Tensor) – parameter specifying the global scaling factor (currently only isotropic scaling supported)
Returns: the transformed shapes in cartesian coordinates
Return type: torch.Tensor- shapes (
-