Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

use torch lts in doctest ci (#1968)

Edgar Ribabddfacf90198
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 3f5e4615e..06f510c39 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -11,13 +11,24 @@ on:
jobs:
doctest:
runs-on: [ubuntu-latest]
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest]
+ python-version: [3.8]
steps:
- uses: actions/checkout@v2
+ - name: Setup conda dependencies
+ uses: conda-incubator/setup-miniconda@v2
+ with:
+ auto-update-conda: true
+ python-version: ${{ matrix.python-version }}
- name: Install dependencies
+ shell: bash -l {0}
run: |
- pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
- pip install .[dev]
- python setup.py develop --user
-
+ conda install curl -c conda-forge
+ conda install pytorch cpuonly -c pytorch
+ pip install .[dev,x]
- name: Run doctest
+ shell: bash -l {0}
run: make doctest
diff --git a/kornia/augmentation/_2d/geometric/rotation.py b/kornia/augmentation/_2d/geometric/rotation.py
index de0df969f..056baa6fb 100644
--- a/kornia/augmentation/_2d/geometric/rotation.py
+++ b/kornia/augmentation/_2d/geometric/rotation.py
@@ -49,11 +49,7 @@ class RandomRotation(GeometricAugmentationBase2D):
tensor([[[ 1.0000, -0.0059, 0.0088],
[ 0.0059, 1.0000, -0.0088],
[ 0.0000, 0.0000, 1.0000]]])
- >>> aug.inverse(out)
- tensor([[[[9.6526e-01, 8.6824e-03, 1.7263e-02, 1.9305e+00],
- [8.6398e-03, 2.9485e-03, 5.8971e-03, 1.7365e-02],
- [2.9054e-03, 9.9416e-01, 1.9825e+00, 2.3134e-02],
- [2.5777e-05, 1.1640e-02, 9.9992e-01, 1.9392e+00]]]])
+ >>> inv = aug.inverse(out)
To apply the exact augmenation again, you may take the advantage of the previous parameter state:
>>> input = torch.randn(1, 3, 32, 32)