View source: R/kerasnip_spec_methods.R
| set_engine.kerasnip_spec | R Documentation |
S3 method for set_engine() dispatched on kerasnip_spec objects.
parsnip::set_engine.model_spec() internally calls new_model_spec(),
which re-creates the spec from scratch with only c(cls, "model_spec") as
the class vector — stripping kerasnip_spec and any custom attributes. This
wrapper preserves the kerasnip_layer_blocks and kerasnip_functional
metadata attributes and re-attaches them (along with the kerasnip_spec
class) after NextMethod() has done its work.
## S3 method for class 'kerasnip_spec'
set_engine(object, engine, ...)
object |
A |
engine |
A character string naming the engine (e.g., |
... |
Additional engine-specific arguments passed to
|
A model_spec object with the kerasnip_spec class and metadata
attributes re-attached.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.