Exemple #1
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_;
        }
Exemple #2
0
        public float batchNormLr    = 0.001F;                                     ///< Learning rate for batch norm coef. Optional parameter [0..)

        public FullyConnected(uint units_,
                              active.type act_          = active.type.relu,
                              optimizer.type opt_       = optimizer.type.adam,
                              float dropOut_            = 0.0f,
                              batchNormType.type bnorm_ = batchNormType.type.none,
                              uint gpuDeviceId_         = 0)
        {
            units       = units_;
            act         = new active(act_);
            opt         = new optimizer(opt_);
            dropOut     = dropOut_;
            bnorm       = new batchNormType(bnorm_);
            gpuDeviceId = gpuDeviceId_;
        }
Exemple #3
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_;
        }
Exemple #4
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,
                             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_;
            gpuDeviceId = gpuDeviceId_;
        }
Exemple #5
0
        public active act = new active(active.type.relu);          ///< Activation function type. Optional parameter

        public Activation(active act_)
        {
            act = act_;
        }