sponge.function.bonds_in

View Source On Gitee
sponge.function.bonds_in(bonds, batch_bond)[source]

Return if batch_bond exists in bonds.

Parameters
  • bonds (Tensor) – The total bonds set.

  • batch_bond (Tensor) – The input bond set.

Returns

If batch_bond exists in bonds, the mask will be 1, else 0.