| ggml_graph_node | R Documentation |
Gets a specific node (tensor) from the computation graph by index
ggml_graph_node(graph, i)
graph |
Graph object |
i |
Node index (0-based, negative indices count from end) |
Tensor pointer
ctx <- ggml_init(16 * 1024 * 1024)
a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 10)
b <- ggml_add(ctx, a, a)
graph <- ggml_build_forward_expand(ctx, b)
# Get the last node (output)
output <- ggml_graph_node(graph, -1)
ggml_free(ctx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.