Documentation
¶
Index ¶
- type Layer
- func Setup(handle *cudnn.Handler, mode gocudnn.PoolingMode, nan gocudnn.NANProp, ...) (l *Layer, y, dy *layers.Tensor, err error)
- func SetupNoOutput(mode gocudnn.PoolingMode, nan gocudnn.NANProp, window, padding, stride []int32) (*Layer, error)
- func SetupNoOutputReverse(mode gocudnn.PoolingMode, nan gocudnn.NANProp, window, padding, stride []int32) (*Layer, error)
- func SetupReverse(handle *cudnn.Handler, mode gocudnn.PoolingMode, nan gocudnn.NANProp, ...) (*Layer, *layers.Tensor, error)
- func (l *Layer) BackProp(handle *cudnn.Handler, x, dx, y, dy *layers.Tensor) error
- func (l *Layer) ForwardProp(handle *cudnn.Handler, x, y *layers.Tensor) error
- func (l *Layer) GetOutputDims(input *layers.Tensor) ([]int32, error)
- func (l *Layer) MakeOutputLayerInference(handle *cudnn.Handler, input *layers.Tensor) (*layers.Tensor, error)
- func (l *Layer) MakeOutputTensor(handle *cudnn.Handler, input *layers.Tensor) (*layers.Tensor, error)
- func (l *Layer) SetBackwardScalars(alpha, beta float64)
- func (l *Layer) SetForwardScalars(alpha, beta float64)
- type Settings
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 everything it needs on the pooling side in order to do the pooling operations.
func Setup ¶
func Setup(handle *cudnn.Handler, mode gocudnn.PoolingMode, nan gocudnn.NANProp, input *layers.Tensor, window, padding, stride []int32) (l *Layer, y, dy *layers.Tensor, err error)
Setup setsup the pooling layer and returns a pointer to the struct. Scalars are set to the default alpha =1.0 and beta =0.0 for both fwd and bwd.
func SetupNoOutput ¶
func SetupNoOutput(mode gocudnn.PoolingMode, nan gocudnn.NANProp, window, padding, stride []int32) (*Layer, error)
SetupNoOutput will setup the pooling layer but not provide an output
func SetupNoOutputReverse ¶
func SetupNoOutputReverse(mode gocudnn.PoolingMode, nan gocudnn.NANProp, window, padding, stride []int32) (*Layer, error)
SetupNoOutputReverse will setup the pooling layer but not provide an output
func SetupReverse ¶
func SetupReverse(handle *cudnn.Handler, mode gocudnn.PoolingMode, nan gocudnn.NANProp, input *layers.Tensor, window, padding, stride []int32) (*Layer, *layers.Tensor, error)
SetupReverse sets up a reverse pooling layer and returns a pointer to the struct. Scalars are set to the default alpha =1.0 and beta =0.0 for both fwd and bwd.
func (*Layer) ForwardProp ¶
ForwardProp performs the pooling forward propigation
func (*Layer) GetOutputDims ¶
GetOutputDims returns the output dims considering the input
func (*Layer) MakeOutputLayerInference ¶
func (l *Layer) MakeOutputLayerInference(handle *cudnn.Handler, input *layers.Tensor) (*layers.Tensor, error)
MakeOutputLayerInference makes the output inference IO which doesn't contain a volume for the deltas
func (*Layer) MakeOutputTensor ¶
func (l *Layer) MakeOutputTensor(handle *cudnn.Handler, input *layers.Tensor) (*layers.Tensor, error)
MakeOutputTensor will make the outputlayer for you
func (*Layer) SetBackwardScalars ¶
SetBackwardScalars will change the default bwd scalars to whatever is passed
func (*Layer) SetForwardScalars ¶
SetForwardScalars will change the default fwd scalars to whatever is passsed
type Settings ¶
type Settings struct { Mode gocudnn.PoolingMode `json:"mode,omitempty"` Nan gocudnn.NANProp `json:"nan,omitempty"` Managed bool `json:"managed,omitempty"` Window []int32 `json:"window,omitempty"` Padding []int32 `json:"padding,omitempty"` Stride []int32 `json:"stride,omitempty"` }
Settings contains all the info needed to build a pooing layer