def is_one
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwiseimport Base
65# Whether the word is 1.0 (0x3F800000), the target mark of a one-hot row.
66def is_one(x: F32) -> Bool:
67 U32.is_eq(bits(x), 1065353216)
Uses (4)
Used by (5)
- bendtorch-core@0.1.0.0/src/tensor/elementwise:scalar
- bendtorch-core@0.1.0.0/src/tensor/loss_ops_LAWS:scalar_one_hot_grad_other
- bendtorch-core@0.1.0.0/src/tensor/loss_ops_LAWS:scalar_one_hot_grad_target
- bendtorch-core@0.1.0.0/src/tensor/loss_ops_LAWS:scalar_pick_negated_other
- bendtorch-core@0.1.0.0/src/tensor/loss_ops_LAWS:scalar_pick_negated_target