예제 #1
0
        /** @copydoc LayerParameterBase::Copy */
        public override void Copy(LayerParameterBase src)
        {
            MeanErrorLossParameter p = (MeanErrorLossParameter)src;

            m_nAxis         = p.m_nAxis;
            m_meanErrorType = p.m_meanErrorType;
        }
예제 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="cuda">Cuda engine.</param>
        /// <param name="log">General log.</param>
        /// <param name="p">provides LossParameter loss_param, with options:
        ///  - axis (optional)
        ///    Specify a label value that whould be ignored when computing the loss.
        ///  - normalize (optional, default true)
        ///    If true, the loss is normalized by the number of (nonignored) labels
        ///    present; otherwise the loss is imply summed over spatial locations.
        ///  - axis (optional, default 1)
        ///    Specify the axis of the probability.
        ///  - mean_type (optional, default ME.MAE)
        ///    Specify the type of mean error to use.
        /// </param>
        public MeanErrorLossLayer(CudaDnn <T> cuda, Log log, LayerParameter p)
            : base(cuda, log, p)
        {
            m_type     = LayerParameter.LayerType.MEAN_ERROR_LOSS;
            m_nAxis    = p.mean_error_loss_param.axis;
            m_meanType = p.mean_error_loss_param.mean_error_type;

            m_blobWork = new Blob <T>(cuda, log);
        }