Ejemplo n.º 1
0
        public static async Task <Datasets <MnistDataSet> > LoadAsync(string trainDir, bool oneHot = false, int?trainSize = null, int?validationSize = null, int?testSize = null, bool showProgressInConsole = false)
        {
            var loader = new MnistModelLoader();

            var setting = new ModelLoadSetting
            {
                TrainDir = trainDir,
                OneHot   = oneHot,
                ShowProgressInConsole = showProgressInConsole
            };

            if (trainSize.HasValue)
            {
                setting.TrainSize = trainSize.Value;
            }

            if (validationSize.HasValue)
            {
                setting.ValidationSize = validationSize.Value;
            }

            if (testSize.HasValue)
            {
                setting.TestSize = testSize.Value;
            }

            return(await loader.LoadAsync(setting));
        }
Ejemplo n.º 2
0
        public static async Task <Datasets <MnistDataSet> > LoadAsync(string trainDir, bool oneHot = false)
        {
            var loader = new MnistModelLoader();

            return(await loader.LoadAsync(new ModelLoadSetting
            {
                TrainDir = trainDir,
                OneHot = oneHot
            }));
        }