clipGradValueGPU function
Implementation
void clipGradValueGPU(GPUTensor<dynamic> tensor, double clipValue, CommandBuffer tape) {
tape.putInt(OP_CLIP_GRAD_VALUE);
// Usually applied directly to the gradients before the optimizer step
tape.putString('${tensor.id}_grad');
tape.putFloat(clipValue);
}