reshapes

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: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ops

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

Ops holds kernel functions. More will be in the making

func Stage

func Stage(handle *cudnn.Handler) (*Ops, error)

Stage stages the ops so that the operations can run

func (*Ops) B2SBackward

func (o *Ops) B2SBackward(handle *cudnn.Handler, x, y *tensor.Volume, stride []int32) error

B2SBackward will take the shapes from y and place it into the batches of x

func (*Ops) B2SForward

func (o *Ops) B2SForward(handle *cudnn.Handler, x, y *tensor.Volume, stride []int32) error

B2SForward will take multiple batches from x and place it into y

func (*Ops) GetB2SOutputProperties

func (o *Ops) GetB2SOutputProperties(x *tensor.Volume, window, stride []int32) (frmt gocudnn.TensorFormat, dtype gocudnn.DataType, dims []int32, err error)

GetB2SOutputProperties returns the properties of the output

func (*Ops) GetS2BOutputDims

func (o *Ops) GetS2BOutputDims(x *tensor.Volume, window, stride []int32) ([]int32, error)

GetS2BOutputDims returns dims of output tensor

func (*Ops) GetS2BOutputProperties

func (o *Ops) GetS2BOutputProperties(x *tensor.Volume, window, stride []int32) (frmt gocudnn.TensorFormat, dtype gocudnn.DataType, dims []int32, err error)

GetS2BOutputProperties returns the properties of the output

func (*Ops) GetS2BOutputPropertiesPLUS

func (o *Ops) GetS2BOutputPropertiesPLUS(x *tensor.Volume, window, stride []int32) (frmt gocudnn.TensorFormat, dtype gocudnn.DataType, dims []int32, n1n2 []int32, err error)

GetS2BOutputPropertiesPLUS returns the properties of the output Pluss the n1 n2 used to increase the size of the batch

func (*Ops) MakeTransformHelper

func (o *Ops) MakeTransformHelper(src, dest *tensor.Volume) (*TransFormHelper, error)

MakeTransformHelper will find the strides needed for dims of src to fit dest. Put it into a strided tensor descriptor and return it to use with transform tensor It is best if destdims[i]= n*srcdims[i]. where n is an int

func (*Ops) ResizeBackward

func (o *Ops) ResizeBackward(handle *cudnn.Handler, dx, dy *tensor.Volume) error

ResizeBackward does a gradient propigation backwards resize channel dims and batch dim must equal

func (*Ops) ResizeForward

func (o *Ops) ResizeForward(handle *cudnn.Handler, x, y *tensor.Volume) error

ResizeForward does a forward propagation resize channel dims and batch dim must equal

func (*Ops) S2BBackward

func (o *Ops) S2BBackward(handle *cudnn.Handler, x, y *tensor.Volume, stride []int32) error

S2BBackward does the backward operation of space to batch aka batch to space values for y will go into x.

func (*Ops) S2BForward

func (o *Ops) S2BForward(handle *cudnn.Handler, x, y *tensor.Volume, stride []int32) error

S2BForward does changes the height and width of the 4d tensor x and places it into the batch dim of y.

func (*Ops) TransformBackward

func (o *Ops) TransformBackward(handle *cudnn.Handler, alpha, beta float64, x, y *tensor.Volume, yhelper *TransFormHelper) error

TransformBackward fills tensor x with the values of y to the best of its ability

func (*Ops) TransformForward

func (o *Ops) TransformForward(handle *cudnn.Handler, alpha, beta float64, x, y *tensor.Volume, yhelper *TransFormHelper) error

TransformForward fills tensor y with x to the best of its ability.

type TransFormHelper

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

TransFormHelper helps with the transform

func (*TransFormHelper) Dims

func (t *TransFormHelper) Dims() []int32

Dims returns the dims for the descriptor

Jump to

Keyboard shortcuts

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