% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kerasnip_spec_methods.R
\name{fit.kerasnip_spec}
\alias{fit.kerasnip_spec}
\title{Fit Method for kerasnip Spec Objects}
\usage{
\method{fit}{kerasnip_spec}(object, ...)
}
\arguments{
\item{object}{A \code{kerasnip_spec} model specification.}

\item{...}{Passed to \code{parsnip::fit.model_spec()}.}
}
\value{
A \code{model_fit} object with the additional \code{kerasnip_model_fit} class
prepended to its class vector.
}
\description{
S3 method for \code{fit()} dispatched on \code{kerasnip_spec} objects. Delegates to
the standard parsnip \code{fit.model_spec()} and then tags the result with the
\code{kerasnip_model_fit} class so that \code{predict.kerasnip_model_fit()} is
dispatched on subsequent calls.

\code{kerasnip_spec} is stripped from the class before \code{NextMethod()} to prevent
parsnip's internal \code{specific_model()} helper from returning more than one
model-class entry, which would break registry lookups. The custom metadata
attributes remain on the object and are thus stored inside the resulting
\code{model_fit$spec}.
}
\keyword{internal}
