pool

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 OpInfo

type OpInfo struct {
	Mode    gocudnn.PoolingMode `json:"Mode"`
	Nan     gocudnn.NANProp     `json:"NAN"`
	Window  []int32             `json:"Window"`
	Padding []int32             `json:"Padding"`
	Stride  []int32             `json:"Stride"`
}

OpInfo is contains all the necessarry information to build a pooling Ops.

func (OpInfo) Stage

func (input OpInfo) Stage() (*Ops, error)

Stage builds and returns an *Op from the info already stored in the Info type.

type Ops

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

Ops holds what the data that is need to perform the pooling operations

func StageOperation

func StageOperation(mode gocudnn.PoolingMode, nan gocudnn.NANProp, window, padding, stride []int32) (*Ops, error)

StageOperation builds the pooling ops

func StageOperationReverse

func StageOperationReverse(mode gocudnn.PoolingMode, nan gocudnn.NANProp, window, padding, stride []int32) (*Ops, error)

StageOperationReverse builds a reverse pooling operation. Experemental!!!!

Will be testing soon. This is just running the backward pooling when forward is called. and it is runing forward pooling when backward is called.

func (*Ops) Backward

func (p *Ops) Backward(handle *cudnn.Handler, alpha, beta float64, x, dx, y, dy *tensor.Volume) error

Backward does the backward propagation operation

func (*Ops) Destroy

func (p *Ops) Destroy() error

Destroy will destroy the Pooling Descriptor

func (*Ops) Forward

func (p *Ops) Forward(handle *cudnn.Handler, alpha, beta float64, x, y *tensor.Volume) error

Forward does the pooling fwd operation

func (*Ops) Info

func (p *Ops) Info() (OpInfo, error)

Info returns the info struct usually used for saving the info to a jason format

func (*Ops) OutputDims

func (p *Ops) OutputDims(input *tensor.Volume) ([]int32, error)

OutputDims returns the dims the output wil have considering the input

func (*Ops) Properties

func (p *Ops) Properties() (gocudnn.PoolingMode, gocudnn.NANProp, []int32, []int32, []int32, error)

Properties returns the pooling properties

Jump to

Keyboard shortcuts

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