Documentation ¶
Overview ¶
Package cuda contains wrapper functions for Cuda api
Index ¶
- Constants
- func GetBlasError(err BlasStatus) error
- func GetDnnError(err DnnStatus) error
- func GetError(err Error) error
- func OpName(op int) string
- type ActivLayer
- type BatchNormLayer
- type BlasStatus
- type Buffer
- type ConvLayer
- func (l *ConvLayer) AlgoName(algo int) string
- func (l *ConvLayer) BiasShape() []int
- func (l *ConvLayer) FilterShape() []int
- func (l *ConvLayer) InShape() []int
- func (l *ConvLayer) Init(s *Stream, bpropWeights, bpropData bool) int
- func (l *ConvLayer) OutShape() []int
- func (l *ConvLayer) Ptr() unsafe.Pointer
- func (l *ConvLayer) Release()
- type Device
- type DnnStatus
- type DropoutLayer
- type Error
- type FilterLayout
- type Layout
- type PoolLayer
- type Stream
Constants ¶
View Source
const ( ActivFprop = iota ActivBprop DropoutFprop DropoutBprop BnormFpropInfer BnormFpropTrain BnormBprop ConvFprop ConvFpropBias ConvBpropData ConvBpropFilter ConvBpropBias PoolFprop PoolBprop )
View Source
const ( FwdAlgo = iota BwdFilterAlgo BwdDataAlgo )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActivLayer ¶
type ActivLayer struct { Src *Layout // contains filtered or unexported fields }
Activation layer descriptor
func (*ActivLayer) InShape ¶
func (l *ActivLayer) InShape() []int
func (*ActivLayer) OutShape ¶
func (l *ActivLayer) OutShape() []int
func (*ActivLayer) Ptr ¶
func (l *ActivLayer) Ptr() unsafe.Pointer
func (*ActivLayer) Release ¶
func (l *ActivLayer) Release()
type BatchNormLayer ¶
Batch normalisation layer descriptor
func (*BatchNormLayer) BiasShape ¶
func (l *BatchNormLayer) BiasShape() []int
func (*BatchNormLayer) FilterShape ¶
func (l *BatchNormLayer) FilterShape() []int
func (*BatchNormLayer) InShape ¶
func (l *BatchNormLayer) InShape() []int
func (*BatchNormLayer) OutShape ¶
func (l *BatchNormLayer) OutShape() []int
func (*BatchNormLayer) Release ¶
func (l *BatchNormLayer) Release()
type BlasStatus ¶
type BlasStatus C.cublasStatus_t
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
type ConvLayer ¶
type ConvLayer struct { Src *Layout Dst *Layout Bias *Layout Filter *FilterLayout Algo [3]int // contains filtered or unexported fields }
Convolution layer descriptor
func Convolution ¶
Create new convolution layer
func (*ConvLayer) FilterShape ¶
type DnnStatus ¶
type DnnStatus C.cudnnStatus_t
type DropoutLayer ¶
type DropoutLayer struct { Src *Layout Reserve Buffer States Buffer // contains filtered or unexported fields }
Dropout layer descriptor
func Dropout ¶
func Dropout(s *Stream, ratio float64, shape []int, seed int64) *DropoutLayer
Create new dropout layer
func (*DropoutLayer) InShape ¶
func (l *DropoutLayer) InShape() []int
func (*DropoutLayer) OutShape ¶
func (l *DropoutLayer) OutShape() []int
func (*DropoutLayer) Ptr ¶
func (l *DropoutLayer) Ptr() unsafe.Pointer
func (*DropoutLayer) Release ¶
func (l *DropoutLayer) Release()
type Error ¶
type Error C.cudaError_t
type FilterLayout ¶
type FilterLayout struct { Dims []int // contains filtered or unexported fields }
Filter layout type
func NewFilterLayout ¶
func NewFilterLayout(nout, nin, h, w int) *FilterLayout
func (*FilterLayout) Ptr ¶
func (l *FilterLayout) Ptr() unsafe.Pointer
func (*FilterLayout) Release ¶
func (l *FilterLayout) Release()
type Layout ¶
type Layout struct { Dims []int // contains filtered or unexported fields }
Layout type represents a cuDNN tensor descriptor
Click to show internal directories.
Click to hide internal directories.