Repository navigation
fix kernel_size np.int64 dtype in torchinfo - #538
Conversation
6b3af23 to
5fddbc4
Compare
Codecov Report
@@ Coverage Diff @@
## master #538 +/- ##
=======================================
Coverage 84.48% 84.48%
=======================================
Files 63 63
Lines 4653 4653
=======================================
Hits 3931 3931
Misses 722 722 |
|
Hey @sliwy, I searched and look's like the Chambon is impact by this issue https://github.com/search?q=repo%3Abraindecode%2Fbraindecode%20.astype(int)&type=code Can you make a small test to test all the models? You can use the models_dict proposed by @PierreGtch. |
|
On the same topic, it would be nice if we had, for every model, a set parameters that can initialise it. This would be useful for testing if the implementations are conform and all the methods of EEGModuleMixin working on every model.
|
|
Hey @bruAristimunha, I checked and for For the test, definitely, it could be something like this in the beginning but we need to know parameters to use or set good default values: |
|
@sliwy not sure all the models can be initialized with their default parameters. Plus I think we should test if the models accept inputs with the desired shape and return outputs with the correct shape: from braindecode.models.util import models_dict
@pytest.mark.parametrize("model_cls", models_dict.values())
def test_model_torchinfo(model_cls):
model = model_cls(n_times=5000, n_chans=1, n_outputs=2)
assert model(torch.ones(3, 1, 5000)).shape == (3, 2) |
|
Let's use two shapes: For the BCI models, we will use BCI 2014 (1, 22, 1001), |
|
As we have already opened other issues to address the requested extra, I will consider this issue closed and we will continue with another PR. Thank you very much @sliwy!! |
It solves #537 where torchinfo was throwing wrong
kernel_sizetype.