Closed timonmerk closed 1 year ago
@timonmerk , thanks for your question and the kind words -- I will try to repro your error tomorrow, but I guess that the offset does not fit the actual receptive field of your defined model.
You need to make sure that the receptive field for your model reduces an input with len(offset)
time steps to a single timestep (which is then squeezed automatically), is this the case in your example?
Let me know if this makes sense -- we'll in any case improve the error message to make this requirement more clear, thanks for flagging!
Thanks a lot for the comment @stes.
It took me some time to debug the model forward calls. But I would need to change with Offset(10,10)
the kernel size of the first nn.Conv1d
to 12. Then, in combination with the three skip connections (each kernel size 3 and stride 1) I get the final output to a "time dimension" of 1. Then the training suceeds.
Great to hear --- I will close this issue for now!
Is there an existing issue for this?
Bug description
Dear CEBRA team,
first of all amazing tool and brilliant paper! I've already used it in different human invasive recording applications, and it just works really great!
I tried now to use an individually defined model, based on the tutorial provided here: https://cebra.ai/docs/usage.html#model-architecture and copied basically the offset-10 architecture https://github.com/AdaptiveMotorControlLab/CEBRA/blob/00601fb843d9618b44f2b174fe1a80195f8008d8/cebra/models/model.py#L249.
Defining this model also works, but when changing the offset from
cebra.data.Offset(5,5)
to any value bigger, e.g.cebra.data.Offset(10,10)
will give an dimension error.So suddenly the
ref
,pos
, andneg
torch tensors become three dimensinal (they have then shape (given the provided example) [100, 3, 11], which were otherwise 2D with Offset (5,5): [100, 3]I tried to adapt the other parameters, maybe it's also related to that.. But due to that I am not able to initialize an own model.
Operating System
Windows 11
CEBRA version
0.2.0
Device type
GPU GeForce RTX2070 SUPER
Steps To Reproduce
I wrote here a minimal example reproducing the error:
Relevant log output
Anything else?
No response
Code of Conduct