| ggml_graph_reset | R Documentation |
Zeroes every gradient in the graph and seeds the loss node's own gradient
with 1 – the value the chain rule starts from. Call this after
ggml_build_backward_expand and before
ggml_graph_compute: without it every gradient computes as
zero, since the backward pass multiplies through a seed that was never set.
ggml_graph_reset(graph)
graph |
Graph object with gradients allocated |
Requires a graph built by ggml_build_forward_expand_grads;
an inference-only graph has no gradients to reset and is rejected.
No return value, called for side effects
ggml_build_backward_expand,
ggml_build_forward_expand_grads
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.