dropout

package
v0.0.0-...-98db5b7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: CC-BY-4.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer struct {
	// contains filtered or unexported fields
}

Layer holds the op for the dropout

func Preset

func Preset(handle *cudnn.Handler, dropout float32, seed uint64) (*Layer, error)

Preset presets the layer, but doesn't build it. Useful if you want to set up the network before the tensor descriptors for the input are made. handle can be nil. I just wanted to keep it consistant.

func Setup

func Setup(handle *cudnn.Handler, x *layers.Tensor, drpout float32, seed uint64) (*Layer, error)

Setup sets up the layer

func (*Layer) BackProp

func (l *Layer) BackProp(handle *cudnn.Handler, dx, dy *layers.Tensor) error

BackProp does the back propagation

func (*Layer) BuildFromPreset

func (l *Layer) BuildFromPreset(handle *cudnn.Handler, input *layers.Tensor) error

BuildFromPreset will construct the dropout layer if preset was made. Both handle and input are needed. This can also be called again if input size has changed

func (*Layer) ForwardProp

func (l *Layer) ForwardProp(handle *cudnn.Handler, x, y *layers.Tensor) error

ForwardProp does the forward propagation

type Settings

type Settings struct {
	Dropout float32 `json:"dropout,omitempty"`
	Seed    uint64  `json:"seed,omitempty"`
}

Settings is the settings for drop out layer

Jump to

Keyboard shortcuts

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