VAlrind is a Python Library
based on Numpy
for Training Neural Networks
, and Training Graph Neural Networks
There are many SOTA Libraries
such as Pytorch
/Tensorflow
/HuggingFace
and much more for doing so.
But VAlrind have a different approach with NNs.
It encodes
the values of a Matrix
of (m x n)
into a Row
/Col
of len(row) = m
/len(col) = n
. Then it uses Bivariate Functions
to calculate the values of Matrix
at every intersection of row
/col
.
It calculates the row
/col
of the Final Matrix
(after the Matrix Multiplication), directly from the row
/col
of the Constituent Matrices
.
Doing so decreases the Time Complexity
of Matrix Multiplication to O(m + n)
.
In this Digram we have used Multiplication
Bivariate Function
For the Multiplication
We denote the row
/col
of the matrices as f_row
/f_col
/s_row
/s_col
/o_row
/o_col
f_row |
Row of First Matrix |
f_col |
Col of First Matrix |
s_row |
Row of Second Matrix |
s_col |
Col of Second Matrix |
o_row |
Row of Output Matrix |
o_col |
Col of Output Matrix |
If we want to calculate what should be at the position [0 , 0]
in the Output Matrix
. The traditional way is to
sum(
(f_col[0] * f_row) *
(s_row[0] * s_col)
)
We can break down the formula as
As we try to iterate over the whole matrix
As f_row
and s_col
act as constants we can take them out of the summission
We introduce some denotions here as
Further denoting this formula as
And thus making our formula for the output matrix.
We denote any Bivariate Function to be (π) and for this Bivariate Function
We introduce some denotions here as
Further denoting this formula as
And thus making our formula for the output matrix.
Note : Sorry for the inconvinence, because of some ambiguity in account with PyPi, we are not able to fully publish the Library, this will be fixed soon
For the Mean-time use the comannd below in your terminal to install the Library
pip install git+https://github.com/avalrind/VAl_rind