% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{autoplot.nn_fit}
\alias{autoplot.nn_fit}
\alias{plot.nn_fit}
\title{Plot training loss history for a fitted neural network}
\usage{
\method{autoplot}{nn_fit}(object, ...)

\method{plot}{nn_fit}(x, ...)
}
\arguments{
\item{object}{A fitted model of class \code{nn_fit}, as returned by
\code{\link[=train_nn]{train_nn()}}, \code{\link[=ffnn]{ffnn()}}, or \code{\link[=rnn]{rnn()}}.}

\item{...}{Additional arguments (currently unused).}

\item{x}{A fitted model of class \code{nn_fit}, as returned by
\code{\link[=train_nn]{train_nn()}}, \code{\link[=ffnn]{ffnn()}}, or \code{\link[=rnn]{rnn()}}.}
}
\value{
A \code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} object showing loss vs epoch.
}
\description{
Creates a line plot of training (and optionally validation) loss over epochs
for a model of class \code{nn_fit}.
}
\examples{
\donttest{
  if (torch::torch_is_installed()) {
    m = train_nn(
      as.matrix(iris[, 2:4]), iris$Sepal.Length,
      epochs = 5
    )
    ggplot2::autoplot(m)
  }
}

}
\keyword{internal}
