| ggml_graph_get_grad | R Documentation |
Returns the tensor holding d(output)/d(node) after
ggml_build_backward_expand has added the backward pass and the
graph has been computed.
ggml_graph_get_grad(graph, node)
ggml_graph_get_grad_acc(graph, node)
graph |
Graph carrying a backward pass |
node |
Tensor whose gradient is wanted |
Returns NULL when the node has no gradient in this graph – because it
was never marked with ggml_set_param, or because nothing
differentiable connects it to the output.
The gradient tensor, or NULL
For ggml_graph_get_grad_acc(), the gradient accumulator
tensor, or NULL
ggml_build_backward_expand
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.