layer

package
v0.0.0-...-da9aff4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvolutionLayer

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

func NewConvolutionLayer

func NewConvolutionLayer(filterDimensionSizes []int, depth int, inputDims []int) *ConvolutionLayer

func (*ConvolutionLayer) BackwardPropagation

func (c *ConvolutionLayer) BackwardPropagation(gradient maths.Tensor, lr float64) maths.Tensor

func (*ConvolutionLayer) ForwardPropagation

func (c *ConvolutionLayer) ForwardPropagation(input maths.Tensor) maths.Tensor

func (*ConvolutionLayer) OutputDims

func (c *ConvolutionLayer) OutputDims() []int

func (*ConvolutionLayer) SaveFiltersAsImages

func (c *ConvolutionLayer) SaveFiltersAsImages(path string) (int, error)

SaveFiltersAsImages saves the filters to images relative to 'path' returns the amount of images saved. saves as grayscale for now

type FullyConnectedLayer

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

func NewFullyConnectedLayer

func NewFullyConnectedLayer(outputLength int, inputDims []int) *FullyConnectedLayer

func (*FullyConnectedLayer) BackwardPropagation

func (d *FullyConnectedLayer) BackwardPropagation(gradient maths.Tensor, lr float64) maths.Tensor

func (*FullyConnectedLayer) ForwardPropagation

func (d *FullyConnectedLayer) ForwardPropagation(input maths.Tensor) maths.Tensor

func (*FullyConnectedLayer) OutputDims

func (d *FullyConnectedLayer) OutputDims() []int

type Layer

type Layer interface {
	ForwardPropagation(input maths.Tensor) maths.Tensor
	BackwardPropagation(gradient maths.Tensor, lr float64) maths.Tensor

	OutputDims() []int
}

type MaxPoolingLayer

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

func NewMaxPoolingLayer

func NewMaxPoolingLayer(strides, sizes, inputDims []int) *MaxPoolingLayer

func (*MaxPoolingLayer) BackwardPropagation

func (m *MaxPoolingLayer) BackwardPropagation(gradient maths.Tensor, lr float64) maths.Tensor

func (*MaxPoolingLayer) ForwardPropagation

func (m *MaxPoolingLayer) ForwardPropagation(input maths.Tensor) maths.Tensor

func (*MaxPoolingLayer) OutputDims

func (m *MaxPoolingLayer) OutputDims() []int

type ReLULayer

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

func NewReLULayer

func NewReLULayer(inputDims []int) *ReLULayer

func (*ReLULayer) BackwardPropagation

func (o *ReLULayer) BackwardPropagation(gradient maths.Tensor, lr float64) maths.Tensor

func (*ReLULayer) ForwardPropagation

func (o *ReLULayer) ForwardPropagation(input maths.Tensor) maths.Tensor

func (*ReLULayer) OutputDims

func (o *ReLULayer) OutputDims() []int

type SoftmaxLayer

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

func NewSoftmaxLayer

func NewSoftmaxLayer(inputDims []int) *SoftmaxLayer

func (*SoftmaxLayer) BackwardPropagation

func (o *SoftmaxLayer) BackwardPropagation(gradient maths.Tensor, lr float64) maths.Tensor

func (*SoftmaxLayer) ForwardPropagation

func (o *SoftmaxLayer) ForwardPropagation(input maths.Tensor) maths.Tensor

func (*SoftmaxLayer) OutputDims

func (o *SoftmaxLayer) OutputDims() []int

Jump to

Keyboard shortcuts

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