Learn R Programming

ggmlR (version 0.6.1)

ggml_new_tensor_4d: Create 4D Tensor

Description

Create 4D Tensor

Usage

ggml_new_tensor_4d(ctx, type = GGML_TYPE_F32, ne0, ne1, ne2, ne3)

Value

Tensor pointer

Arguments

ctx

GGML context

type

Data type (default GGML_TYPE_F32)

ne0

Size of dimension 0

ne1

Size of dimension 1

ne2

Size of dimension 2

ne3

Size of dimension 3

Examples

Run this code
# \donttest{
ctx <- ggml_init(1024 * 1024)
t <- ggml_new_tensor_4d(ctx, GGML_TYPE_F32, 8, 8, 3, 2)
ggml_nelements(t)
ggml_free(ctx)
# }

Run the code above in your browser using DataLab