xidulu commented on issue #18068:
URL: 
https://github.com/apache/incubator-mxnet/issues/18068#issuecomment-629089392


   Thanks for your issue,
   This is indeed a very interesting use case.
   I noticed that this problem also occurred in PyTorch:
   ```python
   >>> inputs = torch.tensor([1,1,1])
   >>> fake_data = torch.tensor([1,1,0])
   >>> 1 - (inputs == fake_data)
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/torch/tensor.py", 
line 394, in __rsub__
       return _C._VariableFunctions.rsub(self, other)
   RuntimeError: Subtraction, the `-` operator, with a bool tensor is not 
supported. If you are trying to invert a mask, use the `~` or `logical_not()` 
operator instead.
   >>>
   ```
   
   If we are capable of providing a solution to this case, that would be a huge 
advantage over PyTorch.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to