I wanted to especially avoid the trivial solution (broadcasting) or atleast find a better alternative. Since A is binary I was trying to use something like index_select but it seems to not work during the forward pass.