How do I make an if statement using a boolean tensor? To be more precise, I\'m trying to compare a tensor of size 1 to a constant, checking to see if the value in the tenso
use reshape(t, []) to obtain the value and use that in your if-statement
reshape(t, [])