powered by
Adds two (or more) tensor nodes element-wise. All tensors must have the same shape. This is the functional equivalent of a residual / skip connection.
ggml_layer_add(tensors, name = NULL)
A new ggml_tensor_node representing the sum.
ggml_tensor_node
A list of ggml_tensor_node objects (length >= 2).
Optional character name for the layer.
# \donttest{ x <- ggml_input(shape = 64L) a <- x |> ggml_layer_dense(64, activation = "relu") b <- x |> ggml_layer_dense(64) out <- ggml_layer_add(list(a, b)) # }
Run the code above in your browser using DataLab