powered by
Add 2D Max Pooling Layer
ggml_layer_max_pooling_2d( model, pool_size = c(2L, 2L), strides = NULL, name = NULL, trainable = TRUE )
The model object with the max pooling layer appended (invisibly).
A ggml_sequential_model object
Integer or vector of 2 integers for pool height and width
Integer or vector of 2 integers (defaults to pool_size)
Optional character name for the layer.
Logical; reserved for API consistency (no weights).
# \donttest{ model <- ggml_model_sequential() |> ggml_layer_conv_2d(32, c(3,3), activation = "relu", input_shape = c(28, 28, 1)) |> ggml_layer_max_pooling_2d(c(2, 2)) # }
Run the code above in your browser using DataLab