zeroGrad method

void zeroGrad(
  1. CommandBuffer tape
)

Writes the command to set the gradient of this GPUTensor to 0.

Implementation

void zeroGrad(CommandBuffer tape) {
  tape.putInt(OP_ZERO_GRAD);
  tape.putString('${id}_grad');
}