big_transfer icon indicating copy to clipboard operation
big_transfer copied to clipboard

module 'torch' has no attribute 'var_mean'

Open longmao-yiran opened this issue 4 years ago • 1 comments

I have got the AttributeError called "module 'torch' has no attribute 'var_mean'" when i run the code I search the Docs in pytorch find var_mean can be used lasters at least 1.2.0 I think you need to change the https://github.com/google-research/big_transfer/blob/6c83d6459e009fa89d84c1e904611e9b162e6eff/bit_pytorch/requirements.txt#L1 to 1.2.0

longmao-yiran avatar May 26 '20 11:05 longmao-yiran

It`s alse can change

https://github.com/google-research/big_transfer/blob/6c83d6459e009fa89d84c1e904611e9b162e6eff/bit_pytorch/models.py#L29 to v = torch.var(w, dim=[1, 2, 3], keepdim=True, unbiased=False) m = torch.mean(w, dim=[1, 2, 3], keepdim=True)

longmao-yiran avatar May 26 '20 12:05 longmao-yiran