View source: R/nn_functional.R
| ggml_input | R Documentation |
Creates a symbolic input node for the Functional API. The node records
only the shape of one sample (without batch dimension); actual
memory is allocated when ggml_compile() is called.
ggml_input(shape, name = NULL, dtype = "float32")
shape |
Integer vector describing the shape of a single sample.
For flat feature vectors use a scalar, e.g. |
name |
Optional character name for the input tensor. |
dtype |
Data type of the input: |
A ggml_tensor_node object.
x <- ggml_input(shape = 64L)
x <- ggml_input(shape = c(28L, 28L, 1L), name = "image")
x <- ggml_input(shape = 10L, dtype = "int32") # token indices
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.