Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
0c575ace
Commit
0c575ace
authored
May 02, 2019
by
ekka
Committed by
Soumith Chintala
May 02, 2019
Browse files
Improve doc of Linear Transformation (#881)
parent
1949eea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
torchvision/transforms/transforms.py
torchvision/transforms/transforms.py
+4
-3
No files found.
torchvision/transforms/transforms.py
View file @
0c575ace
...
@@ -782,10 +782,11 @@ class LinearTransformation(object):
...
@@ -782,10 +782,11 @@ class LinearTransformation(object):
subtract mean_vector from it which is then followed by computing the dot
subtract mean_vector from it which is then followed by computing the dot
product with the transformation matrix and then reshaping the tensor to its
product with the transformation matrix and then reshaping the tensor to its
original shape.
original shape.
Applications:
Applications:
-
whitening transformation: Suppose X is a column vector zero-centered data.
whitening transformation: Suppose X is a column vector zero-centered data.
Then compute the data covariance matrix [D x D] with torch.mm(X.t(), X),
Then compute the data covariance matrix [D x D] with torch.mm(X.t(), X),
perform SVD on this matrix and pass it as transformation_matrix.
perform SVD on this matrix and pass it as transformation_matrix.
Args:
Args:
transformation_matrix (Tensor): tensor [D x D], D = C x H x W
transformation_matrix (Tensor): tensor [D x D], D = C x H x W
mean_vector (Tensor): tensor [D], D = C x H x W
mean_vector (Tensor): tensor [D], D = C x H x W
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment