Pytorch: Add logical AND/OR/NOT/XOR operations

Created on 5 Oct 2016  路  1Comment  路  Source: pytorch/pytorch

Not super important, but might be useful to have those logical operators in the core.

As a workaround implementation, they can be simulated with current functions. For example

-- t1 and t2 are ByteTensors with 0 or 1 only
function tensor_and(t1, t2)
  return (t1 + t2):eq(2)
end
todo

Most helpful comment

Implemented in #342.

>All comments

Implemented in #342.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajarshd picture rajarshd  路  3Comments

bartvm picture bartvm  路  3Comments

negrinho picture negrinho  路  3Comments

mishraswapnil picture mishraswapnil  路  3Comments

ikostrikov picture ikostrikov  路  3Comments