towhee.models.collaborative_experts.collaborative_experts.drop_nans¶
- towhee.models.collaborative_experts.collaborative_experts.drop_nans(x, ind, validate_missing)[source]¶
Remove nans, which we expect to find at missing indices.
- Parameters:
x (torch.Tensor) – Features
ind (torch.Tensor) – Binary values denoting whether or not a given feature is present.
validate_missing (bool) – Whether to validate that the missing location contains a nan.
- Returns:
The features, with the missing values masked to zero.
- Return type:
(torch.tensor)