Copies graph into ctx. With force_grads = TRUE the copy
carries gradient storage even when the original does not, which is one way to
turn a plain forward graph into one that
ggml_build_backward_expand accepts.
ggml_graph_dup(ctx, graph, force_grads = FALSE)A new graph object (external pointer)
GGML context to allocate the copy in
Graph to duplicate
Logical; give the copy gradient storage (default
FALSE)
ggml_build_forward_expand_grads