Documentation ¶
Index ¶
- func Flags() (act gocudnn.ActivationMode, Nan gocudnn.NANProp)
- type Flag
- type Mode
- type OpInfo
- type Ops
- func (act *Ops) BwdProp(handle *cudnn.Handler, alpha float64, y *tensor.Volume, dy *tensor.Volume, ...) error
- func (act *Ops) Destroy() error
- func (act *Ops) FwdProp(handle *cudnn.Handler, alpha float64, x *tensor.Volume, beta float64, ...) error
- func (act *Ops) Info() (OpInfo, error)
- func (act *Ops) Mode() Mode
- func (act *Ops) Properties() (Mode, gocudnn.NANProp, float64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mode ¶
type Mode struct {
// contains filtered or unexported fields
}
Mode passes Mode flags
func (*Mode) ClippedRelu ¶
ClippedRelu places a ceiling on the output
func (*Mode) Identity ¶
Identity passes identity. It is used for bwd and fwd convolutionactivationbiasfwd
func (*Mode) Threshhold ¶
Threshhold passes a Threshhold mode flag. It is an experimental function.
type OpInfo ¶
type OpInfo struct { Mode Mode `json:"mode,omitempty"` NanProp gocudnn.NANProp `json:"nan_prop,omitempty"` Coef float64 `json:"coef,omitempty"` DataType gocudnn.DataType `json:"data_type,omitempty"` }
OpInfo contains the necissary information to build an activation Ops
type Ops ¶
type Ops struct {
// contains filtered or unexported fields
}
Ops is the non linear function that is used in neural networks. This structure holds the information used to performing the activation function.
func Stage ¶
func Stage(handle *cudnn.Handler, mode Mode, dtype gocudnn.DataType, nan gocudnn.NANProp, coef float64) (*Ops, error)
Stage creates an activation struct given the properties passed in function
func (*Ops) BwdProp ¶
func (act *Ops) BwdProp( handle *cudnn.Handler, alpha float64, y *tensor.Volume, dy *tensor.Volume, x *tensor.Volume, beta float64, dx *tensor.Volume, negcoef *tensor.Volume, dnegcoef *tensor.Volume, thresh *tensor.Volume, dthresh *tensor.Volume, poscoef *tensor.Volume, dposcoef *tensor.Volume) error
BwdProp is the backwards propigation of the activation struct
In-place operation is allowed for this routine; meaning dy and dx pointers may be equal. However, this requires the corresponding tensor descriptors to be identical (particularly, the strides of the input and output must match for an in-place operation to be allowed).
All tensor formats are supported for 4 and 5 dimensions, however, the best performance is obtained when the strides of yDesc and xDesc are equal and HW-packed. For more than 5 dimensions the tensors must have their spatial dimensions packed.
func (*Ops) FwdProp ¶
func (act *Ops) FwdProp( handle *cudnn.Handler, alpha float64, x *tensor.Volume, beta float64, y *tensor.Volume, negcoef *tensor.Volume, thresh *tensor.Volume, poscoef *tensor.Volume) error
FwdProp is the forward propigation function for the Activation struct