This does not make memory usage increasing:
>>> while True:
...     a = Variable(torch.FloatTensor(32,16).cuda())
...     s1,s2 = int(a.size()[0]),int(a.size()[1])
...     r = Variable(torch.FloatTensor(1).cuda())
...     c = r.expand((s1,s2))

I tried and I have the same bug when I direclty use torch.size().
I have no idea what causes this thing…