Ejemplo n.º 1
0
 public FullyConnected(uint kernel_, calcMode.type mode_ = calcMode.type.CPU,
                       batchNormType.type bnorm_         = batchNormType.type.none)
 {
     kernel = kernel_;
     bnorm  = new batchNormType(bnorm_);
     mode   = new calcMode(mode_);
 }
Ejemplo n.º 2
0
        public float batchNormLr    = 0.001F;                                     ///< Learning rate for batch norm coef. Optional parameter [0..)

        public Convolution(uint kernel_,
                           active.type act_          = active.type.relu,
                           optimizer.type opt_       = optimizer.type.adam,
                           float dropOut_            = 0.0F,
                           batchNormType.type bnorm_ = batchNormType.type.none,
                           uint fWidth_        = 3,
                           uint fHeight_       = 3,
                           int padding_        = 0,
                           uint stride_        = 1,
                           uint dilate_        = 1,
                           calcMode.type mode_ = calcMode.type.CPU,
                           uint gpuDeviceId_   = 0)
        {
            kernel      = kernel_;
            act         = new active(act_);
            opt         = new optimizer(opt_);
            dropOut     = dropOut_;
            bnorm       = new batchNormType(bnorm_);
            fWidth      = fWidth_;
            fHeight     = fHeight_;
            padding     = padding_;
            stride      = stride_;
            dilate      = dilate_;
            mode        = new calcMode(mode_);
            gpuDeviceId = gpuDeviceId_;
        }
Ejemplo n.º 3
0
 public Deconvolution(uint kernel_, calcMode.type mode_ = calcMode.type.CPU,
                      batchNormType.type bnorm_         = batchNormType.type.none)
 {
     kernel = kernel_;
     mode   = new calcMode(mode_);
     bnorm  = new batchNormType(bnorm_);
 }
Ejemplo n.º 4
0
 public FullyConnected(uint units_, calcMode.type mode_ = calcMode.type.CPU,
                       batchNormType.type bnorm_        = batchNormType.type.none)
 {
     units = units_;
     bnorm = new batchNormType(bnorm_);
     mode  = new calcMode(mode_);
 }
Ejemplo n.º 5
0
 public Deconvolution(uint filters_, calcMode.type mode_ = calcMode.type.CPU,
                      batchNormType.type bnorm_          = batchNormType.type.none)
 {
     filters = filters_;
     mode    = new calcMode(mode_);
     bnorm   = new batchNormType(bnorm_);
 }
Ejemplo n.º 6
0
        public bool gpuClearMem = false;                           ///< Clear memory GPU. Optional parameter

        public Pooling(calcMode.type mode_ = calcMode.type.CPU,
                       uint gpuDeviceId_   = 0,
                       bool gpuClearMem_   = false)
        {
            mode        = new calcMode(mode_);
            gpuDeviceId = gpuDeviceId_;
            gpuClearMem = gpuClearMem_;
        }
Ejemplo n.º 7
0
 public Convolution(uint kernel_, int padding_ = 0, calcMode.type mode_ = calcMode.type.CPU,
                    batchNormType.type bnorm_  = batchNormType.type.none)
 {
     kernel  = kernel_;
     padding = padding_;
     mode    = new calcMode(mode_);
     bnorm   = new batchNormType(bnorm_);
 }
Ejemplo n.º 8
0
 public Convolution(uint filters_, int padding_ = 0, calcMode.type mode_ = calcMode.type.CPU,
                    batchNormType.type bnorm_   = batchNormType.type.none)
 {
     filters = filters_;
     padding = padding_;
     mode    = new calcMode(mode_);
     bnorm   = new batchNormType(bnorm_);
 }
Ejemplo n.º 9
0
        public float batchNormLr    = 0.001F;                                     ///< Learning rate for batch norm coef. Optional parameter [0..)

        public FullyConnected(uint kernel_,
                              active.type act_          = active.type.relu,
                              optimizer.type opt_       = optimizer.type.adam,
                              float dropOut_            = 0.0f,
                              batchNormType.type bnorm_ = batchNormType.type.none,
                              calcMode.type mode_       = calcMode.type.CPU,
                              uint gpuDeviceId_         = 0)
        {
            kernel      = kernel_;
            act         = new active(act_);
            opt         = new optimizer(opt_);
            dropOut     = dropOut_;
            bnorm       = new batchNormType(bnorm_);
            mode        = new calcMode(mode_);
            gpuDeviceId = gpuDeviceId_;
        }
Ejemplo n.º 10
0
        public float batchNormLr    = 0.001F;                                     ///< Learning rate for batch norm coef. Optional parameter [0..)

        public Deconvolution(uint filters_,
                             active.type act_          = active.type.relu,
                             optimizer.type opt_       = optimizer.type.adam,
                             float dropOut_            = 0.0F,
                             batchNormType.type bnorm_ = batchNormType.type.none,
                             uint fWidth_        = 3,
                             uint fHeight_       = 3,
                             uint stride_        = 1,
                             calcMode.type mode_ = calcMode.type.CPU,
                             uint gpuDeviceId_   = 0)
        {
            filters     = filters_;
            act         = new active(act_);
            opt         = new optimizer(opt_);
            dropOut     = dropOut_;
            bnorm       = new batchNormType(bnorm_);
            fWidth      = fWidth_;
            fHeight     = fHeight_;
            stride      = stride_;
            mode        = new calcMode(mode_);
            gpuDeviceId = gpuDeviceId_;
        }