torch / torch7

http://torch.ch
Other
8.97k stars 2.38k forks source link

what is torch.lt for? #1148

Open micklexqg opened 6 years ago

micklexqg commented 6 years ago

for the given script, pattern = torch.lt(pattern,density):byte() -- 25% 1s and 75% 0s what is the method torch.lt() for?

Naruto-Sasuke commented 6 years ago

pattern is a tensor with random float numbers(0-1 I think), torch.lt makes those values that lower than density equal 0s and the others 1s.