transformer {transformer}R Documentation

Transformer

Description

Transformer

Usage

transformer(x, d_model, num_heads, dff, mask = NULL)

Arguments

x

inputs

d_model

dimensions of the model

num_heads

number of heads

dff

dimensions of feed-forward model

mask

optional mask

Value

output of the transformer layer

Examples

x <- matrix(rnorm(50 * 512), 50, 512)
d_model <- 512
num_heads <- 8
dff <- 2048

output <- transformer(x, d_model, num_heads, dff)

[Package transformer version 0.2.0 Index]