Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue using class activation map #4

Closed
paulomaia20 opened this issue Mar 26, 2019 · 4 comments
Closed

Issue using class activation map #4

paulomaia20 opened this issue Mar 26, 2019 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@paulomaia20
Copy link

Hi,

Thank you so much for sharing the code.

I'm having some issues with using class activation map on a dataset trained using FCN:

x_train.reshape(x_train.shape[0], x_train.shape[1], 1)

ValueError: cannot reshape array of size 1272000 into shape (424,750,1)

My x_train has the size (343, 750, 4) in which I have 343 samples with 750 points and 4 channels. What am I doing wrong?

Thank you in advance

@paulomaia20
Copy link
Author

I managed to change the "1" to "4" in that code line and also changed it to 4 in:

ts = ts.reshape(1,-1,1) to ts.reshape(1,-1,4).

Is the obtained class map representative of all channels? I cannot obtain a class map per channel due to the architecture of the network, am I correct?

@hfawaz
Copy link
Owner

hfawaz commented Mar 27, 2019

Hello,

Thanks for the interest in the code.

You are right, I think the changes that you have made are correct.

And yes, you cannot have a class activation map for each channel with the current architecture.

If the problem is resolved, feel free to close the issue.

Thanks

@hfawaz hfawaz added enhancement New feature or request good first issue Good for newcomers labels Mar 27, 2019
@paulomaia20
Copy link
Author

Thank you!

@sadransh
Copy link

sadransh commented Mar 7, 2021

@paulomaia20 Did you solve this for MTS? Could you please share how?

@hfawaz Could you please let me know how I visualize CAM for MTS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants