Commit 0c575ace authored by ekka's avatar ekka Committed by Soumith Chintala
Browse files

Improve doc of Linear Transformation (#881)

parent 1949eea9
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment