rc

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package rc contains built-in Residual Connections (RC).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostNorm

func PostNorm(
	g *ag.Graph,
	f func(...ag.Node) []ag.Node,
	norm func(...ag.Node) []ag.Node,
	xs ...ag.Node,
) []ag.Node

PostNorm performs post-norm residual connections:

y = Norm(x + F(x))

func PreNorm

func PreNorm(
	g *ag.Graph,
	f func(...ag.Node) []ag.Node,
	norm func(...ag.Node) []ag.Node,
	xs ...ag.Node,
) []ag.Node

PreNorm performs pre-norm residual connections:

y = x + F(Norm(x))

func ReZero

func ReZero(
	g *ag.Graph,
	f func(...ag.Node) []ag.Node,
	alpha ag.Node,
	xs ...ag.Node,
) []ag.Node

ReZero performs residual connections by rescaling the function with an alpha learnable parameter (Bachlechner et al., 2020):

y = x + alpha * F(x)

Types

This section is empty.

Jump to

Keyboard shortcuts

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