-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Whether is possible to customize the CNN-Explainer #9
Comments
Good question :) Unfortunately, you would need to change some javascript code if you fine-tune the underlying model to other classes. It would be very straightforward though, if you are using our tiny-VGG architecture (with 10 output classes). Let me know if you are interested in trying out; I can give you some pointers to the functions you might need to change. I will close this issue for now. |
Sorry for duplicate the question. I thought I forget to submit it. :) I am interested in trying out to modify the functions. Can you point me the functions? Thx, |
Sure! You can change the output class labels here: Lines 30 to 31 in 0a6e09e
It matches the order of your output labels in your tiny-vgg model. If you are using 10 class, then changing the line above should be good to go. If you are using other number of classes, then here are some functions you want to look into: cnn-explainer/src/overview/overview-draw.js Lines 495 to 510 in 0a6e09e
cnn-explainer/src/overview/overview-draw.js Lines 540 to 542 in 0a6e09e
cnn-explainer/src/overview/overview-draw.js Lines 121 to 136 in 0a6e09e
Keep me updated when you are trying out new classes. I'm happy to help :) |
Thank you so much for pointing out the classes. I will check it and let you
know if there are any other questions. Thank you so much.
Best regards,
Yang Lin | Data Scientist
[email protected]
https://www.linkedin.com/in/yanglinly
…On Mon, May 11, 2020 at 1:46 PM Jay Wang ***@***.***> wrote:
Sure! You can change the output class labels here:
https://github.com/poloclub/cnn-explainer/blob/0a6e09ea5548f97160b93b925a883f35a7d5b80e/src/config.js#L30-L31
It matches the order of your output labels in your tiny-vgg model. If you
are using 10 class, then changing the line above should be good to go. If
you are using other number of classes, then here are some functions you
want to look into:
https://github.com/poloclub/cnn-explainer/blob/0a6e09ea5548f97160b93b925a883f35a7d5b80e/src/overview/overview-draw.js#L495-L510
https://github.com/poloclub/cnn-explainer/blob/0a6e09ea5548f97160b93b925a883f35a7d5b80e/src/overview/overview-draw.js#L540-L542
https://github.com/poloclub/cnn-explainer/blob/0a6e09ea5548f97160b93b925a883f35a7d5b80e/src/overview/overview-draw.js#L121-L136
Keep me updated when you are trying out new classes. I'm happy to help :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFHZB5K622HLSNI4GXIWUKLRRBBZ3ANCNFSM4M3NVZOA>
.
|
A user has successfully adapted CNN Explainer to other dataset in #14 . You can see their public GitHub page and code repository. Hopefully you find these pointers helpful :) |
Hi.
Thank you for sharing this excellent work. The explainer is super helpful for understanding the CNN.
Since I am not familiar with the TF.js. I wonder if I finetune the tiny-VGG on other datasets for example dog vs cat, will explainer automatically change to show how the CNN works on dog vs cat? Or I have to rewrite the part of the js to make it works. Thank you.
The text was updated successfully, but these errors were encountered: