% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/custom_layers.R
\name{layer_pos_sinusoid_wrapper}
\alias{layer_pos_sinusoid_wrapper}
\title{Layer for positional encoding}
\usage{
layer_pos_sinusoid_wrapper(
maxlen = 100,
vocabulary_size = 4,
n = 10000,
load_r6 = FALSE,
embed_dim = 64
)
}
\arguments{
\item{maxlen}{Length of predictor sequence.}
\item{vocabulary_size}{Number of unique character in vocabulary.}
\item{n}{Frequency of sine waves for positional encoding. Only applied if \code{pos_encoding = "sinusoid"}.}
\item{load_r6}{Whether to load the R6 layer class.}
\item{embed_dim}{Dimension for token embedding. No embedding if set to 0. Should be used when input is not one-hot encoded
(integer sequence).}
}
\value{
A keras layer implementing positional encoding using sine/cosine waves.
}
\description{
Positional encoding layer with sine/cosine matrix of different frequencies.
}
\examples{
\donttest{
library(keras)
l <- layer_pos_sinusoid_wrapper()
}
}