Learn R Programming

ggmlR (version 0.6.1)

ggml_layer_concatenate: Concatenate Tensor Nodes Along an Axis

Description

Concatenates two or more tensor nodes along the specified axis.

Usage

ggml_layer_concatenate(tensors, axis = 0L, name = NULL)

Value

A new ggml_tensor_node representing the concatenated tensor.

Arguments

tensors

A list of ggml_tensor_node objects (length >= 2).

axis

Integer axis along which to concatenate (0-based, ggml convention). Default 0L concatenates along the first dimension (features for flat tensors).

name

Optional character name for the layer.

Examples

Run this code
# \donttest{
x   <- ggml_input(shape = 32L)
y   <- ggml_input(shape = 32L)
out <- ggml_layer_concatenate(list(x, y), axis = 0L)
# }

Run the code above in your browser using DataLab