8000
Skip to content

feat: support dynamic shape for plot_feature_topomap - #107

Merged
tczhangzhi merged 1 commit into
torcheeg:mainfrom
wufei-png:wf/subgraph_shape
May 3, 2024
Merged

feat: support dynamic shape for plot_feature_topomap#107
tczhangzhi merged 1 commit into
torcheeg:mainfrom
wufei-png:wf/subgraph_shape

Conversation

@wufei-png
Copy link
Copy Markdown

No description provided.

@wufei-png
wufei-png commented May 2, 2024
Copy link
Copy Markdown
Author

My dataset uses faced, which has nine classes, which resulted in a drawing that was too long, so I added the adjustable shape feature:
shap

3*3 shape is easier to watch:
shap99
The fig_shape param can be None so this is compatible with older version func call.,fig_shape[0] is height and fig_shape[1] is width.

besides, I found this test cannot be passed:

self.assertEqual(img.shape, (347, 1550, 4))

my result shape is (350, 1550, 4):

Traceback (most recent call last):
  File "/home/wufei/github.com/wufei-png/torcheeg/test/utils/test_visualize.py", line 17, in test_plot_raw_topomap
    self.assertEqual(img.shape, (347, 1550, 4))
AssertionError: Tuples differ: (350, 1550, 4) != (347, 1550, 4)

same shape mismatches occur with one or two other graphing functions.

My test steps were, first make sure torcheeg is not installed over the network, then python setup.py install then python test_visualize.py, I can't see what's wrong.

It's a bit strange, I would suggest you to check if this shape is correct, it's also possible that we have different versions of torcheeg's dependency libraries.

If your test is fine, then see if my newly added test code matches your results, whichever is yours

@wufei-png
wufei-png commented May 2, 2024
Copy link
Copy Markdown
Author

besides, I have to say that this repository is very useful for us to train the baseline model, thanks, I am going to add the above mentioned faced dataset to torcheeg, when I have some time.

@wufei-png
wufei-png force-pushed the wf/subgraph_shape branch 5 times, most recently from 3299ee3 to 45df346 Compare May 2, 2024 18:05
@wufei-png
wufei-png marked this pull request as draft May 2, 2024 18:25
@wufei-png
wufei-png force-pushed the wf/subgraph_shape branch from 45df346 to b8845a1 Compare May 2, 2024 18:36
@wufei-png
wufei-png force-pushed the wf/subgraph_shape branch from b8845a1 to 4b4a377 Compare May 2, 2024 18:36
@wufei-png
wufei-png marked this pull request as ready for review May 2, 2024 18:40
@tczhangzhi
Copy link
Copy Markdown
Collaborator

Thank you for your contribution. The code implementation looks very standard. I will directly merge them. This contribution will be noted in the changelog for the next version update.

@tczhangzhi
tczhangzhi merged commit a70a8a1 into torcheeg:main May 3, 2024
@tczhangzhi
Copy link
Copy Markdown
Collaborator

I will uniformly refactor the test cases for the plotting part.

@tczhangzhi tczhangzhi self-assigned this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0