Learn R Programming

ggmlR (version 0.6.1)

ggml_new_tensor_1d: Create 1D tensor

Description

Create 1D tensor

Create 1D Tensor

Usage

ggml_new_tensor_1d(ctx, type = GGML_TYPE_F32, ne0)

ggml_new_tensor_1d(ctx, type = GGML_TYPE_F32, ne0)

Value

Tensor pointer

Tensor pointer

Arguments

ctx

GGML context

type

Data type

ne0

Size

Examples

Run this code
# \donttest{
ctx <- ggml_init(1024 * 1024)
tensor <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 10)
ggml_nelements(tensor)
ggml_free(ctx)
# }

Run the code above in your browser using DataLab