R/layers.R
conv.Rd
Wrapper for a convolutional layer. The dimensions of the convolution operation are
inferred from the shape of the input data. This shape must follow the pattern
(batch_shape, x, [y, [z, ]], channel)
where dimensions y
and z
are optional, and channel
will be either 1
for grayscale images or
generally 3
for colored ones.
conv(filters, kernel_size, padding = "same", max_pooling = NULL, average_pooling = NULL, upsampling = NULL, activation = "linear")
filters  Number of filters learned by the layer 

kernel_size  Integer or list of integers indicating the size of the weight matrices to be convolved with the image 
padding  One of "valid" or "same" (caseinsensitive). See

max_pooling 

average_pooling 

upsampling 

activation  Optional, string indicating activation function (linear by default) 
A construct with class "ruta_network"
Other neural layers: dense
,
dropout
, input
,
layer_keras
, output
,
variational_block
# Sample convolutional autoencoder net < input() + conv(16, 3, max_pooling = 2, activation = "relu") + conv(8, 3, max_pooling = 2, activation = "relu") + conv(8, 3, upsampling = 2, activation = "relu") + conv(16, 3, upsampling = 2, activation = "relu") + conv(1, 3, activation = "sigmoid")