Describe the bug
It is possible to create a Var object whose declared shape and "real shape" (i.e. the shape of the array it holds, passed as the init parameter) differ.
To reproduce current behavior
Steps to reproduce the behavior:
When I run this code
def my_code():
shape = (2,2) # innocent shape declaration
weights = np.array([[1, -1], [-1, 1]]) # init value, corresponding to the shape
v = Var(shape=(shape, shape), init=weights) # wrong/strange shape declaration (this is similar to the first block of code from tutorial02_ecxitatory_inhibitory_network.ipynb)
print(v.shape)
print(v.init.shape)
if __name__ == "__main__":
# the var shape attribute and the init value shape should match?
my_code()
I get this error ...
shapes won't match
Expected behavior
an AssertionError should have happened impeding me to declare such a Var
Environment (please complete the following information):
Device: Laptop
OS:Ubuntu Linux 20.04
Lava 0.9.0
Additional context
I found this in the first block of code from tutorial02_ecxitatory_inhibitory_network.ipynb, in the line
Describe the bug It is possible to create a Var object whose declared shape and "real shape" (i.e. the shape of the array it holds, passed as the init parameter) differ. To reproduce current behavior Steps to reproduce the behavior:
Expected behavior an AssertionError should have happened impeding me to declare such a Var
Environment (please complete the following information):
Additional context I found this in the first block of code from tutorial02_ecxitatory_inhibitory_network.ipynb, in the line
The tutorial is from the commit 5ed88f790106e8c508f7dcc44200d05eebcf87e0