Пример #1
0
        private static MatrixIdentifier __storeAndGetID(Matrix matrix)
        {
            MatrixIdentifier id = new MatrixIdentifier();

            __matrixStore[id] = matrix;
            return(id);
        }
Пример #2
0
        private static MatrixIdentifier __makeMatrix(int rows, int columns)
        {
            Matrix           matrix = new Matrix(rows, columns);
            MatrixIdentifier id     = __storeAndGetID(matrix);

            return(id);
        }
Пример #3
0
        private static MatrixIdentifier __makeMatrix(double[,] array)
        {
            Matrix           matrix = new Matrix(array);
            MatrixIdentifier id     = __storeAndGetID(matrix);

            return(id);
        }
Пример #4
0
        public static EmbeddingBatch MakeEmbeddingBatch(int[,] array, int partDimension)
        {
            Matrix           matrix = new EmbeddingMatrix(array, partDimension);
            MatrixIdentifier id     = __storeAndGetID(matrix);

            return(new EmbeddingBatch(id));
        }
Пример #5
0
        public static VectorBatch __ApplyWeightsToVectorBatch(WeightsMatrix weightsMatrix, VectorBatch inputBatch)
        {
            Matrix matrix       = __matrixStore[weightsMatrix.MatrixID];
            Matrix batch        = __matrixStore[inputBatch.MatrixID];
            Matrix resultMatrix = batch.MultiplyBy(matrix);

            MatrixIdentifier id = __storeAndGetID(resultMatrix);

            return(new VectorBatch(id));
        }
Пример #6
0
 public BiasesVector(MatrixIdentifier id)
     : base(id)
 {
 }
Пример #7
0
 public WeightsMatrix(MatrixIdentifier id)
     : base(id)
 {
 }
Пример #8
0
 public NetMatrix(MatrixIdentifier id)
 {
     MatrixID = id;
 }
Пример #9
0
 public VectorBatch(MatrixIdentifier id)
     : base(id)
 {
 }
Пример #10
0
 public EmbeddingBatch(MatrixIdentifier id)
     : base(id)
 {
 }
Пример #11
0
        public static VectorBatch MakeVectorBatchFromArray(double[,] array)
        {
            MatrixIdentifier id = __makeMatrix(array);

            return(new VectorBatch(id));
        }
Пример #12
0
        public static BiasesVector MakeZeroBiasesVector(int dimension)
        {
            MatrixIdentifier id = __makeMatrix(1, dimension);

            return(new BiasesVector(id));
        }
Пример #13
0
        public static WeightsMatrix MakeWeightsMatrixFromArray(double[,] array)
        {
            MatrixIdentifier id = __makeMatrix(array);

            return(new WeightsMatrix(id));
        }
Пример #14
0
        public static WeightsMatrix MakeZeroWeightsMatrix(int rows, int columns)
        {
            MatrixIdentifier id = __makeMatrix(rows, columns);

            return(new WeightsMatrix(id));
        }
Пример #15
0
 public static int GetColumnCount(MatrixIdentifier id)
 {
     return(__matrixStore[id].ColumnCount);
 }
Пример #16
0
 public static int GetRowCount(MatrixIdentifier id)
 {
     return(__matrixStore[id].RowCount);
 }