The LieTorch library generalizes PyTorch to 3D transformation groups. Just as `torch.Tensor` is a multi-dimensional matrix of scalar elements, `lietorch.SE3` is a multi-dimensional matrix of SE3 elements. We support common tensor manipulations such as indexing, reshaping, and broadcasting. Group operations can be composed into computation graphs and backpropagation is automatically peformed in the tangent space of each element. For more details, please see our paper:
使用 DAS PyTorch需要参考[《DCU新手入门教程》](https://developer.hpccube.com/gitbook/dcu_tutorial/index.html)在主机系统安装以下组件:
### Requirements:
- DCU驱动程序
* Cuda >= 10.1 (with nvcc compiler)
- DTK
* PyTorch >= 1.8
- Docker引擎
We recommend installing within a virtual enviornment. Make sure you clone using the `--recursive` flag. If you are using Anaconda, the following command can be used to install all dependencies
To run the examples, you will need OpenCV and Open3D. Depending on your operating system, OpenCV and Open3D can either be installed with pip or may need to be built from source
```
```
pip install opencv-python open3d
1. 编译whl包并安装
pip3 install wheel
pip3 install pytest
cd lietorch
python3 setup.py bdist_wheel
cd dist
pip3 install lietorch-* --no-deps --force
```
```
### Installing (from source)
## 验证
Clone the repo using the `--recursive` flag and install using `setup.py` (may take up to 10 minutes)
### Converting between Groups Elements and Euclidean Embeddings
We provide differentiable `FromVec` and `ToVec` functions which can be used to convert between LieGroup elements and their vector embeddings. Additional, the `.matrix` function returns a 4x4 transformation matrix.
```python
# random quaternion
q=torch.randn(1,4,requires_grad=True)
q=q/q.norm(dim=-1,keepdim=True)
# create SO3 object from quaternion (differentiable w.r.t q)