View source: R/nn_functional.R
| ggml_layer_add | R Documentation |
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)
tensors |
A list of |
name |
Optional character name for the layer. |
A new ggml_tensor_node representing the sum.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.