# \donttest{
model <- ggml_model_sequential() |>
ggml_layer_conv_2d(32, c(3,3), activation = "relu",
input_shape = c(28, 28, 1)) |>
ggml_layer_flatten() |>
ggml_layer_dense(128, activation = "relu")
# Position-wise feed-forward, as in a transformer block.
x <- ggml_input(shape = c(10L, 32L))
ff <- x |> ggml_layer_dense(64L, activation = "relu", time_distributed = TRUE)
# }
Run the code above in your browser using DataLab