Learn R Programming

ggmlR (version 0.6.1)

ag_param: Create a parameter tensor (gradient tracked)

Description

Create a parameter tensor (gradient tracked)

Usage

ag_param(
  data,
  device = .ag_device_state$device,
  dtype = .ag_device_state$dtype
)

Value

An ag_tensor with requires_grad = TRUE

Arguments

data

Numeric matrix or vector

device

"cpu" (default) or "gpu"

dtype

Floating-point precision: "f32" (default), "f16", or "bf16". Ignored on CPU; controls upload precision on GPU.