@Chun_Li, this is a bug in PyTorch master.  I wrote up an issue here:

  
      github.com/pytorch/pytorch
  
  
    



Issue: The result of comparison operations may have requires_grad=True 65


	
	opened by colesbury
	on 2017-10-28
	
	
	


For example:
import torch
from torch.autograd import Variable
v = Variable(torch.randn(5,5), requires_grad=True)
x = v < 0
print(x.requires_grad) # True
The problem is that many functions now...


 	medium priority