def target_gradient
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwiseimport Base
69# -(g / count), the gradient PyTorch's nll_loss with mean reduction gives the
70# target cell of each row.
71def target_gradient(g: F32, +count: F32) -> F32:
72 F32.neg(F32.div(g, count))