- 23 Mar, 2020 1 commit
-
-
Danylo Ulianych authored
* F.normalize unsqueeze mean & std if necessary * added tests to F.normalize for 3d mean & std tensors
-
- 27 Feb, 2020 1 commit
-
-
Eldar Kurtic authored
-
- 25 Feb, 2020 1 commit
-
-
Phoenix Meadowlark authored
* Improved error messages for transforms.functional.normalize(). Split the original TypeError into 1. a TypeError if `tensor` is not a torch.Tensor and 2. a ValueError if `tensor` does not have the correct dimensionality. Added more detail to the error for when `tensor` has the wrong dimension to make it easier to diagnose. This is useful when this function isn't called directly by the user (e.g. when the user uses transforms.Normalize and can't directly see this functions doc string). Deleted hanging function `_is_tensor_image()`. It isn't used in this file and isn't used internally anywhere else in torchvision that I can see. (Some users will have used it despite the underscore prefix, but a quick google search for "F._is_tensor_image" suggests this is rare). * Value checking to prevent division by zero runtime crashes. Added a ValueError to check for and avoid division by zero in `div_`. Not preventing the call leads to runtime crashes, at least in some environments. * Fixed div by zero check for non-scalar inputs.
-
- 29 Jan, 2020 1 commit
-
-
Francisco Massa authored
-
- 22 Jan, 2020 2 commits
-
-
Philip Meier authored
-
Philip Meier authored
* initial fix * outsourced num bands lookup * fix doc * added pillow version requirement * simplify number of bands extraction * remove unrelated change * remove indirect dependency on pillow>=5.2.0 * extend docstring to transform * bug fix * added test
-
- 29 Oct, 2019 1 commit
-
-
pedrofreire authored
* Improve readability of affine transformation code * Make shear transformation area preserving The previous shear implementation did not preserve area, and we implement a version that does. The formula used was verified with the following sympy code: from sympy import Matrix, cos, sin, tan, simplify from sympy.abc import x, y, phi Xs = Matrix( [[1, -tan(x)], [0, 1]] ) Ys = Matrix( [[1, 0], [-tan(y), 1]] ) R = Matrix( [[cos(phi), -sin(phi)], [sin(phi), cos(phi)]] ) RSS = Matrix( [[cos(phi - y)/cos(y), -cos(phi - y)*tan(x)/cos(y) - sin(phi)], [sin(phi - y)/cos(y), -sin(phi - y)*tan(x)/cos(y) + cos(phi)]]) print(simplify(R * Ys * Xs - RSS)) One thing that is not clear (and could be tested) is whether avoiding the explicit products and calculations in _get_inverse_affine_matrix really gives performance benefits - compared to doing the explicit calculation done in _test_transformation. * Use np.matmul instead of @ The @ syntax is not supported in Python 2.
-
- 18 Oct, 2019 1 commit
-
-
Surgan Jandial authored
* doc-build fixed * deprecation fixes * deprecation updates
-
- 30 Sep, 2019 1 commit
-
-
Philip Meier authored
-
- 11 Sep, 2019 1 commit
-
-
Philip Meier authored
* Adds optional fill colour to rotate * bug fix
-
- 06 Sep, 2019 1 commit
-
-
Vishwak Srinivasan authored
-
- 09 Jul, 2019 1 commit
-
-
Surgan Jandial authored
* to_pil_image updates * lint * Update test_transforms.py * Update test_transforms.py
-
- 06 Jul, 2019 1 commit
-
-
Zhun Zhong authored
* Fix bug to Random Erasing 1. Avoid forever loop for getting parameters of erase. 2. replace' img_b' by 'img_c', because it indicates the channel. 3. replace v = torch.rand([img_c, h, w]) by v = torch.empty([img_c, h, w], dtype=torch.float32).normal_(). Normally distributed achieves better performance. * add test * Update test_transforms.py * Update transforms.py * Update test_transforms.py * Update transforms.py * Update functional.py
-
- 03 Jul, 2019 1 commit
-
-
ptrblck authored
* initial commit * add more checks, fix lint, fix doc
-
- 28 Jun, 2019 2 commits
-
-
Surgan Jandial authored
* updates on normalize * test fixes * Update test_transforms.py
-
Surgan Jandial authored
* test improved * Update test_transforms.py * behaviour changes RandomErasing * test fixes * linter fix
-
- 24 Jun, 2019 1 commit
-
-
Zhun Zhong authored
* add erase function * add Random Erasing * Update transforms.py * Update transforms.py * add test for random erasing * Update test_transforms.py * fix flake8 * Update test_transforms.py * Update functional.py * Update test_transforms.py * fix bug for per-pixel erasing * Update transforms.py * specific for coordinate (x, y) * add raise TypeError for img * Update transforms.py * Update transforms.rst
-
- 20 Jun, 2019 1 commit
-
-
Geovanni Zhang authored
* fix:error message of to_tensor The error "pic should be PIL Image or ndarray. Got '<numpy.ndarray>'" is confusing. * fix:a clearer function name _is_numpy_image is clearer than _is_numpy_image_dim * fix:add a test case Add a test case in test/test_transforms.py to test the error message * fix:pass ci check * fix:wrong random matrix
-
- 14 Jun, 2019 2 commits
-
-
Francisco Massa authored
* Fix normalize for different dtype than float32 * Fix lint
-
François Darmon authored
Change documentation of perspective(). The doc was about an old version that used directly transformation parameters
-
- 14 May, 2019 1 commit
-
-
SHU authored
Enable fillcolor option for affine transformation for Pillow >= 5.0.0 as described
-
- 25 Apr, 2019 1 commit
-
-
Surgan Jandial authored
* final changes * final * linter * test changes * linter * lint * indent * lint * minor changes * parameter added * ci * ci fixes * indent * indent * indent * arg fixed
-
- 29 Mar, 2019 1 commit
-
-
Parth Agarwal authored
Changed 'channely' to 'channel' in the comments of normalize function.
-
- 26 Mar, 2019 1 commit
-
-
ekka authored
-
- 24 Mar, 2019 1 commit
-
-
ekka authored
-
- 09 Mar, 2019 1 commit
-
-
Irvin Ho authored
-
- 26 Feb, 2019 1 commit
-
-
Surgan Jandial authored
-
- 18 Feb, 2019 1 commit
-
-
surgan12 authored
* randomresizedmods * lint checks * test to randomrescrop added * updates * tests updated * tests updated * upd * updates * Update torchvision/transforms/transforms.py Co-Authored-By:surgan12 <33121121+surgan12@users.noreply.github.com> * tests changed * trvis * travis * fixes syntax * ... * flake fixes * flake_fixes * flake_fixes2
-
- 08 Jan, 2019 1 commit
-
-
surgan12 authored
* doc change * doc changes * lint_checks * Update transforms.py
-
- 30 Dec, 2018 1 commit
-
-
surgan12 authored
* normalise * some changes * Update functional.py * Update functional.py * code changes
-
- 17 Dec, 2018 1 commit
-
-
surgan12 authored
* modes added * tests_added * Update test_transforms.py * Update test_transforms.py * Update test_transforms.py
-
- 14 Dec, 2018 1 commit
-
-
surgan12 authored
* bug fixes to_tensor * tensor checked
-
- 13 Dec, 2018 1 commit
-
-
surgan12 authored
* pad updated * checked pad * pad checked * pad checked
-
- 04 Dec, 2018 1 commit
-
-
Varun Agrawal authored
* added separate checks for dimensionality in to_pil_image and added tests * updated to_pil_image to use both 2D ndarrays and tensors, as well as refactored the tests
-
- 02 Nov, 2018 1 commit
-
-
CUI Hao authored
-
- 25 Oct, 2018 1 commit
-
-
Kyryl Truskovskyi authored
* cast mnist targer to int * fix unused variables * fix syntax in tests * remove # noqa; rename l variable to line_split; use except OSError * add W504 * add W504 * add W503,W504 tox.ini
-
- 11 Sep, 2018 1 commit
-
-
Tongzhou Wang authored
-
- 23 Jul, 2018 1 commit
-
-
Vishwak Srinivasan authored
-
- 28 May, 2018 1 commit
-
-
Holger Kohr authored
-
- 27 May, 2018 1 commit
-
-
Holger Kohr authored
-