Use && instead of and (#1663)

* Use && instead of and

* Remove "and" in ops.cpp
This commit is contained in:
Cheng
2024-12-08 11:26:39 +09:00
committed by GitHub
parent 6ae5423b4a
commit d92ea094f1
2 changed files with 2 additions and 2 deletions

View File

@@ -533,7 +533,7 @@ array scaled_dot_product_attention(
throw std::invalid_argument(msg.str());
}
}
if (mask and (*mask).ndim() > 4) {
if (mask && (*mask).ndim() > 4) {
std::ostringstream msg;
msg << "[scaled_dot_product_attention] the mask with shape "
<< (*mask).shape() << " expected to have at most rank 4";