% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autocast.R
\name{cuda_amp_grad_scaler}
\alias{cuda_amp_grad_scaler}
\title{Creates a gradient scaler}
\usage{
cuda_amp_grad_scaler(
  init_scale = 2^16,
  growth_factor = 2,
  backoff_factor = 0.5,
  growth_interval = 2000,
  enabled = TRUE
)
}
\arguments{
\item{init_scale}{a numeric value indicating the initial scale factor.}

\item{growth_factor}{a numeric value indicating the growth factor.}

\item{backoff_factor}{a numeric value indicating the backoff factor.}

\item{growth_interval}{a numeric value indicating the growth interval.}

\item{enabled}{a logical value indicating whether the gradient scaler should be enabled.}
}
\value{
A gradient scaler object.
}
\description{
A gradient scaler instance is used to perform dynamic gradient scaling
to avoid gradient underflow when training with mixed precision.
}
