-
Hi, I would like to ask you if you could help me to improve a problem that I have. Let me first setup the experiment. Now what I would like to do is create a new Thanks!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You should be able to do this via a simple mapping = torch.full((indx_g1.size(0), ), -1, dtype=torch.long)
mapping[g1_simpl] = torch.arange(g1_simple.size(0))
indx_g1 = mapping[indx_g1]
mask = indx_g1 != -1
indx_g1 = indx_g1[mask] |
Beta Was this translation helpful? Give feedback.
You should be able to do this via a simple
mapping
vector and some fancy indexing/masking logic: