formula_to_function: Formula to Function with Named Arguments

View source: R/torch-code-gen.R

formula_to_functionR Documentation

Formula to Function with Named Arguments

Description

Formula to Function with Named Arguments

Usage

formula_to_function(
  formula_or_fn,
  default_fn = NULL,
  arg_names = NULL,
  alias_map = NULL
)

Arguments

formula_or_fn

A formula or function

default_fn

Default function if formula_or_fn is NULL

arg_names

Character vector of formal argument names

alias_map

Named list mapping arg_names to formula aliases (e.g., list(in_dim = ".in"))

Value

A function


kindling documentation built on March 3, 2026, 9:07 a.m.