Documentation
¶
Index ¶
- type Layer
- func (l *Layer) BackProp(handle *cudnn.Handler, x, y *layers.Tensor) error
- func (l *Layer) ForwardProp(handle *cudnn.Handler, x, y *layers.Tensor) error
- func (l *Layer) MakeOutputTensor(handle *cudnn.Handler, x *layers.Tensor) (*layers.Tensor, error)
- func (l *Layer) MakeOutputTensorInference(handle *cudnn.Handler, x *layers.Tensor) (*layers.Tensor, error)
- func (l *Layer) MakeTranFormHelper(x, y *layers.Tensor) (*TransFormHelper, error)
- type Mode
- type ModeFlag
- type TransFormHelper
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 is the that type that handles reshape methods
func Build ¶
func Build(handle *cudnn.Handler, mode Mode, dtype gocudnn.DataType, window []int32, networkinput bool) (*Layer, error)
Build builds the layer mode picks the mode window has to be passed if S2B it is a set size that you want each batch to be. window will be ignored if mode was picked to transpose All will be ignored of you pick transform
func SetupB2S ¶
SetupB2S sets up Batch 2 Shape layer. If networkinput is true the delta values will not be passed. Window decides how it will shape with respect to h and w. Window must be a factor of the batch. Example NCHW vector of [24,5,2,3]. If window of [4,3]. The vector output will be [2,5,8,9]. Placing batches is row dominant like in C.
func SetupS2B ¶
SetupS2B sets up Shape 2 Batch layer. If networkinput is true the delta values will not be passed. Window decides how it will shape of the batches with h and w. The window doesn't need to be a factor of the input values. The last values will be zero Example NCHW vector of [2,5,8,8]. If window of [3,3]. The vector output will be [18,5,3,3]. Placing batches is row dominant like in C.
func (*Layer) BackProp ¶
BackProp performs the backprop prop x is the input and output and y is the input
func (*Layer) ForwardProp ¶
ForwardProp performs the forward prop x is the input and y is the input and output
func (*Layer) MakeOutputTensor ¶
MakeOutputTensor returns a layer.IO for the network
func (*Layer) MakeOutputTensorInference ¶
func (l *Layer) MakeOutputTensorInference(handle *cudnn.Handler, x *layers.Tensor) (*layers.Tensor, error)
MakeOutputTensorInference makes the output tensor for inference
func (*Layer) MakeTranFormHelper ¶
func (l *Layer) MakeTranFormHelper(x, y *layers.Tensor) (*TransFormHelper, error)
MakeTranFormHelper create a transformhelper
type TransFormHelper ¶
type TransFormHelper struct {
// contains filtered or unexported fields
}
TransFormHelper helps reshaping