In addition, I debugged the ‘forward’ in https://github.com/eelxpeng/dec-pytorch/blob/master/lib/dec.py 3 that has the same function with our ‘scale1_soft_assign’ and found that the  function does not obviously increase the memory.