set_args.kerasnip_spec: set_args Method for kerasnip Spec Objects

View source: R/kerasnip_spec_methods.R

set_args.kerasnip_specR Documentation

set_args Method for kerasnip Spec Objects

Description

S3 method for set_args() dispatched on kerasnip_spec objects. parsnip::set_args.model_spec() calls new_model_spec(), which strips any extra classes and attributes. This wrapper saves and re-attaches the kerasnip_layer_blocks and kerasnip_functional metadata attributes (and the kerasnip_spec class) after NextMethod() has done its work.

Usage

## S3 method for class 'kerasnip_spec'
set_args(object, ...)

Arguments

object

A kerasnip_spec model specification.

...

Named model arguments to update, passed to parsnip::set_args.model_spec().

Value

A model_spec object with the kerasnip_spec class and metadata attributes re-attached.


kerasnip documentation built on Sept. 4, 2026, 1:06 a.m.