Learn R Programming

ggmlR (version 0.6.1)

ggml_new_tensor_2d: Create 2D tensor

Description

Create 2D tensor

Create 2D Tensor

Usage

ggml_new_tensor_2d(ctx, type = GGML_TYPE_F32, ne0, ne1)

ggml_new_tensor_2d(ctx, type = GGML_TYPE_F32, ne0, ne1)

Value

Tensor pointer

Tensor pointer

Arguments

ctx

GGML context

type

Data type

ne0

Rows

ne1

Columns

Examples

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

Run the code above in your browser using DataLab