powered by
Create a Conv1D Layer Object
Add 1D Convolution Layer
ggml_layer_conv_1d( model, filters, kernel_size, activation = NULL, input_shape = NULL, strides = 1L, padding = "valid", name = NULL, trainable = TRUE )ggml_layer_conv_1d( model, filters, kernel_size, activation = NULL, input_shape = NULL, strides = 1L, padding = "valid", name = NULL, trainable = TRUE )
ggml_layer_conv_1d( model, filters, kernel_size, activation = NULL, input_shape = NULL, strides = 1L, padding = "valid", name = NULL, trainable = TRUE )
A ggml_layer object.
ggml_layer
The model object with the conv_1d layer appended (invisibly).
A ggml_sequential_model object
Number of output filters
Integer kernel size
Activation function name: "relu", "sigmoid", "tanh", "softmax", or NULL
Input shape c(L, C) - required for first layer only (length, channels)
Integer stride (default 1)
"valid" (no padding) or "same" (preserve length)
Optional character name for the layer.
Logical; whether the layer weights are updated during training.
# \donttest{ model <- ggml_model_sequential() |> ggml_layer_conv_1d(32, 3, activation = "relu", input_shape = c(100, 1)) # }
Run the code above in your browser using DataLab