コード例 #1
0
        /// <summary>
        /// Creating FeedForward - Neural Network
        /// </summary>
        /// <param name="memoryFolderName"></param>
        /// <param name="networkStructure"></param>
        /// <param name="testDatasetPath"></param>
        /// <returns>Returns success result of network creating</returns>
        public bool CreateNetwork(string memoryFolderName,
                                  NetworkStructure networkStructure,
                                  string testDatasetPath = null)
        {
            _networkStructure = networkStructure;

            if (FileManager.CheckMemoryIntegrity(networkStructure, memoryFolderName))
            {
                try
                {
                    _networkTeacher = new NetworksTeacher(networkStructure);
                }
                catch
                {
                    return(false);
                }

                if (testDatasetPath != null)
                {
                    _networkTeacher.TestVectors = FileManager.LoadTestDataset(testDatasetPath);
                }

                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        // TODO: Выделить структуру Extraction-зоны в отдельный объект
        public void CreateNetwork(NetworkStructure networkStructure,
                                  int netsCountInAssembly = 1,
                                  string testDatasetsPath = null)
        {
            _fileManager = new FileManager(networkStructure);

            // TODO: [WARP] Тут настраивается схема слоев convolution и pooling
            Extractor extractor = new Extractor("cpcppp", CreateConvFiltersScheme());

            _networkTeacher = new NetworksTeacher(extractor, networkStructure, netsCountInAssembly, _fileManager);

            // TODO: Сделать тестовое, но по изображению
            //if (testDatasetsPath != null)
            //{
            //    _networkTeacher.TestVectors = _fileManager.LoadDatasets(testDatasetsPath);
            //}
        }