Yonghongwei / Gradient-Centralization

A New Optimization Technique for Deep Neural Networks
533 stars 80 forks source link

function grad.mean() Error #2

Closed lucaskyle closed 4 years ago

lucaskyle commented 4 years ago

sorry I got an Error in optimizer GCC

grad.add_(-grad.mean(dim = tuple(range(1,len(list(grad.size())))), keepdim = True))

TypeError: mean received an invalid combination of arguments - got (keepdim=bool, dim=tuple, ), but expected one of:

dim should not be tuple right? my pytorch vision 0.3.1

lucaskyle commented 4 years ago

sorry for bothering u . i fixed it. just use pytorch upon 1.10.