sin_attention

command
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 16 Imported by: 0

README

sin_attention

该示例演示了如何使用tnn库来构造RNN和LSTM模型,模型主要由:2个Transformer模块、Flatten层、Sigmoid层、Output层构成,参数定义如下:

const lr = 1e-3
const epoch = 1000
const batchSize = 128
const steps = 32
const dims = 8
const transformerSize = 2

下面是模型训练后拟合出的图像:

attention

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL