LinearTransformation does not accept mean_vector

Hi,
I am trying to perform ZCA on my dataset and I am using LinearTransformation as instructed in the documentation.
But it seams like LinearTransformation does not accpet a second argument (mean_vector).

transforms.LinearTransformation(transformation_matrix=transformation_matrix, mean_vector=mean_vector)
TypeError: init() got an unexpected keyword argument ‘mean_vector’

I would appreciate if someone tells me what I am missing here.
Thanks,
T

Which torchvision version are you using?
It looks like this PR introduced the mean_vector argument followed by other PRs, which added it back to LinearTransformation instead of AffineTransformation.
Could you update torchvision and check it again?

Thank you for your response, I am using ‘1.1.0.dev20190513’. Is it because I am using the nightly version?

The LinearTransformation is part of torchvision not PyTorch, so your PyTorch version should be fine.
Try to update torchvision to the latest version.

1 Like

updated torchvision to 0.3 and now LinearTransformation works as expected. Thanks!

1 Like