Beispiel #1
0
        public void LoadNetworkWeights(string BaseDirectory, string BaseFileName, int sizex, int sizey)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedOps.Free(Weights);

            Weights = new ManagedArray(sizex, sizey);

            ManagedFile.Load2D(filename, Weights);
        }
        public void LoadHiddenLayerWeights(string BaseDirectory, string BaseFileName, int sizex, int sizey)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedOps.Free(Wkj);

            Wkj = new ManagedArray(sizex, sizey);

            ManagedFile.Load2DV2(filename, Wkj);
        }
Beispiel #3
0
        public ManagedArray LoadClassification(string BaseDirectory, string BaseFileName, int sizex, int sizey)
        {
            var classification = new ManagedArray(sizex, sizey);

            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Load2DV2(filename, classification);

            return(classification);
        }
Beispiel #4
0
        public ManagedArray LoadData(string BaseDirectory, string BaseFileName, int sizex, int sizey, int sizez)
        {
            var data = new ManagedArray(sizex, sizey, sizez);

            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Load3DV2(filename, data);

            return(data);
        }
Beispiel #5
0
        public void LoadNetworkBias(string BaseDirectory, string BaseFileName, int sizeb)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedOps.Free(Bias);

            Bias = new ManagedArray(1, sizeb);

            ManagedFile.Load1DY(filename, Bias);
        }
Beispiel #6
0
        public void LoadFeatureMapBias(string BaseDirectory, string BaseFileName, int layer, int sizei)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedOps.Free(Layers[layer].Bias);

            Layers[layer].Bias = new ManagedArray(sizei);

            ManagedFile.Load1D(filename, Layers[layer].Bias);
        }
Beispiel #7
0
        public void SaveFeatureMap(string BaseDirectory, string BaseFileName, int layer)
        {
            for (var i = 0; i < Layers[layer].FeatureMap.i; i++)
            {
                for (var j = 0; j < Layers[layer].FeatureMap.j; j++)
                {
                    var filename = string.Format("{0}/{1}{2,0:D2}{3,0:D2}.txt", BaseDirectory, BaseFileName, i + 1, j + 1);

                    ManagedFile.Save2D4D(filename, Layers[layer].FeatureMap, i, j);
                }
            }
        }
Beispiel #8
0
        public void LoadFeatureMap(string BaseDirectory, string BaseFileName, int layer, int sizex, int sizey, int sizei, int sizej)
        {
            ManagedOps.Free(Layers[layer].FeatureMap);

            Layers[layer].FeatureMap = new ManagedArray(sizex, sizey, 1, sizei, sizej);

            for (var i = 0; i < sizei; i++)
            {
                for (var j = 0; j < sizej; j++)
                {
                    var filename = string.Format("{0}/{1}{2,0:D2}{3,0:D2}.txt", BaseDirectory, BaseFileName, i + 1, j + 1);

                    ManagedFile.Load2D4D(filename, Layers[layer].FeatureMap, i, j);
                }
            }
        }
        public void SaveHiddenLayerWeights(string BaseDirectory, string BaseFileName)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Save2D(filename, Wkj);
        }
Beispiel #10
0
        public void SaveClassification(string BaseDirectory, string BaseFileName, ManagedArray classification)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Save2D(filename, classification);
        }
Beispiel #11
0
        public void SaveData(string BaseDirectory, string BaseFileName, ManagedArray data)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Save3D(filename, data);
        }
Beispiel #12
0
        public void SaveNetworkBias(string BaseDirectory, string BaseFileName)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Save1DY(filename, Bias);
        }
Beispiel #13
0
        public void SaveNetworkWeights(string BaseDirectory, string BaseFileName)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Save2D(filename, Weights);
        }
Beispiel #14
0
        public void SaveFeatureMapBias(string BaseDirectory, string BaseFileName, int layer)
        {
            var filename = string.Format("{0}/{1}.txt", BaseDirectory, BaseFileName);

            ManagedFile.Save1D(filename, Layers[layer].Bias);
        }