I am getting the error in below procedure at the line with comments below
x.var is not taking dim as tuple.
Is any one getting the same error
def update_stats(self, x):
print(x.size())
m = x.mean((0,2,3), keepdim=True)
print(m.size())
v = x.var((0,2,3), keepdim=True) # This gives syntax error saying Var() needs dim as int but tuple given
self.means.lerp_(m, self.mom)
self.vars.lerp_ (v, self.mom)
return m,v
Oh, that’s strange. I assumed my pytorch was up-to-date because I ran conda update --all first, but this is what I get:
## Package Plan ##
environment location: /opt/anaconda3
The following packages will be UPDATED:
pytorch pytorch::pytorch-1.0.0-py3.7_cuda10.0~ --> pkgs/main::pytorch-1.0.1-cuda100py37he554f03_0