layers

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: 9 Imported by: 14

Documentation

Overview

Package layers contains shared things between layers. It also contains functions that will be supplimental to cudnn.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Concat

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

Concat does the concat operation

func CreateConcat

func CreateConcat(h *cudnn.Handler) (c *Concat, err error)

CreateConcat creates a concat operation handler

func (*Concat) Backward

func (c *Concat) Backward(h *cudnn.Handler, srcs []*Tensor, dest *Tensor) error

Backward does the backward concat dest to srcs

func (*Concat) FindOutputDims

func (c *Concat) FindOutputDims(srcs []*Tensor) (outputdims []int32, err error)

FindOutputDims finds the output dims

func (*Concat) Forward

func (c *Concat) Forward(h *cudnn.Handler, srcs []*Tensor, dest *Tensor) error

Forward does the forward concat srcs to dest

type Tensor

type Tensor struct {
	*tensor.Volume
	// contains filtered or unexported fields
}

Tensor is a tensor with volume

func BuildRandomTensor

func BuildRandomTensor(handle *cudnn.Handler, frmt gocudnn.TensorFormat, dtype gocudnn.DataType, dims []int32, mean, std float32) (*Tensor, error)

BuildRandomTensor builds a fix sized input

func CreateTensor

func CreateTensor(handle *cudnn.Handler, frmt gocudnn.TensorFormat, dtype gocudnn.DataType, dims []int32) (t *Tensor, err error)

CreateTensor creates a tensor.

func ZeroClone

func ZeroClone(h *cudnn.Handler, t *Tensor) (c *Tensor, err error)

ZeroClone returns a zeroed out clone of the tensor passed

func (*Tensor) AvgX

func (t *Tensor) AvgX(handle *cudnn.Handler) (x float32, err error)

AvgX returns the Avg X value for the IO

func (*Tensor) LoadValuesFromSLice

func (t *Tensor) LoadValuesFromSLice(handle *cudnn.Handler, input interface{}, length int32) error

LoadValuesFromSLice takes a go slice and fills it into the tensor sitting in the gpu. If the length of goslice doesn't fit the input it will return an error

func (*Tensor) MaxX

func (t *Tensor) MaxX(handle *cudnn.Handler) (x float32, err error)

MaxX returns the MaxX per batch value in the tensor or if it is used for the filter it would be the MaxX value per neuron

func (*Tensor) MinX

func (t *Tensor) MinX(handle *cudnn.Handler) (x float32, err error)

MinX returns the minx value per batch in the tensor or if it is used for the filter it would be the minx value per neuron

func (*Tensor) Norm1X

func (t *Tensor) Norm1X(handle *cudnn.Handler) (x float32, err error)

Norm1X returns Norm1 X value for IO

func (*Tensor) Norm2X

func (t *Tensor) Norm2X(handle *cudnn.Handler) (x float32, err error)

Norm2X returns Norm2 X value for IO

Directories

Path Synopsis
Package cnn contains structs and methods used to do forward, and backward operations for convolution layers
Package cnn contains structs and methods used to do forward, and backward operations for convolution layers

Jump to

Keyboard shortcuts

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