ggml_predict: Get Predictions from a Trained Model

View source: R/nn_model.R

ggml_predict.ggml_functional_modelR Documentation

Get Predictions from a Trained Model

Description

Runs forward pass on input data and returns prediction probabilities (or raw output values for regression). Unlike ggml_evaluate(), this does not require labels.

Usage

## S3 method for class 'ggml_functional_model'
ggml_predict(model, x, batch_size = 32L, ...)

ggml_predict(model, ...)

## S3 method for class 'ggml_sequential_model'
ggml_predict(model, x, batch_size = 32L, ...)

Arguments

model

A trained ggml_sequential_model

x

Input data (matrix or array)

batch_size

Batch size for inference

...

Additional arguments (ignored).

Value

Matrix of predictions with shape [N, output_units]


ggmlR documentation built on July 14, 2026, 1:08 a.m.