initialization of the STM
Closed this issue · 2 comments
Visdoom commented
Hi there Lucas,
I was wondering if you could give a documentation about how to initialize the STM model without knowing the number of linear and non linear components in your input.
from cmt.transforms import WhiteningPreconditioner
# preprocessing
wt = WhiteningPreconditioner(input, output)
stm = STM(dim_in_nonlinear=input.shape[0])
stm.initialize(*wt(input, output))
always results in the error
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-121-b9e4ce8a4de7> in <module>()
1 stm= STM(dim_in_linear= input.shape[0], dim_in_nonlinear=50,)
----> 2 stm.initialize(*wt(input, output))
RuntimeError: Data has wrong dimensionality.
because the output.rows() != dimOut()
condition is triggered in
if(input.rows() != dimIn() || output.rows() != dimOut())
throw Exception("Data has wrong dimensionality.");
...
However, I cannot control for the output dimension. So how to circumvent that problem?
lucastheis commented
Hi Sophie,
The STM models a single neuron whose spikes/spike counts should be stored in the 1xN
matrix output
.
What are the multiple rows of your output
representing?
Visdoom commented
Hey Lucas,
I actually came back to it. The multiple rows in output are multiple trials.