| ggml_layer_flatten | R Documentation |
Flattens the spatial dimensions into a single vector per sample.
ggml_layer_flatten(model, name = NULL, trainable = TRUE)
model |
A ggml_sequential_model object |
name |
Optional character name for the layer. |
trainable |
Logical; reserved for API consistency (no weights). |
The model object with the flatten layer appended (invisibly).
model <- ggml_model_sequential() |>
ggml_layer_conv_2d(32, c(3,3), activation = "relu",
input_shape = c(28, 28, 1)) |>
ggml_layer_flatten()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.