Solved by ptrblck in post #2 
              
              
                This seems to be related to this issue as it seems that the BoolTensor is transformed to a ByteTensor where True represents 255. Feel free to add your use case to this issue.