예제 #1
0
 /// <summary>
 /// The constructor.
 /// </summary>
 /// <param name="param">Specifies the creation parameters.</param>
 /// <param name="log">Specifies the output log used to show status updates.</param>
 /// <param name="evtCancel">Specifies the cancel event used to abort the creation process.</param>
 public MnistDataLoader(MnistDataParameters param, Log log, CancelEvent evtCancel)
 {
     m_param     = param;
     m_log       = log;
     m_evtCancel = evtCancel;
     m_evtCancel.Reset();
 }
        /// <summary>
        /// The constructor.
        /// </summary>
        /// <param name="param">Specifies the creation parameters.</param>
        /// <param name="log">Specifies the output log used to show status updates.</param>
        /// <param name="evtCancel">Specifies the cancel event used to abort the creation process.</param>
        public MnistDataLoader(MnistDataParameters param, Log log, CancelEvent evtCancel)
        {
            m_extractor             = new MnistDataLoaderLite(Path.GetDirectoryName(param.TrainImagesFile));
            m_extractor.OnProgress += m_extractor_OnProgress;
            m_extractor.OnError    += m_extractor_OnError;

            m_param     = param;
            m_log       = log;
            m_evtCancel = evtCancel;
            m_evtCancel.Reset();
        }