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

Change of animate_activations #22

Open
mcxxmc opened this issue Nov 22, 2021 · 2 comments
Open

Change of animate_activations #22

mcxxmc opened this issue Nov 22, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@mcxxmc
Copy link
Collaborator

mcxxmc commented Nov 22, 2021

The 0.0.5 release changes the function of the animate_activations. Now the resulted new gif is sometimes confusing and I think the old gif is more illustrative.

To slow down the gif, I think we can adjust the way we stack the gif. For example, for each image we stack it twice, it may slow down the gif by half. The number of times each images is stacked can be an parameter with default value as 1 or something bigger (or the number can grow as the input size grows).

Furthur more, the user can also use some online gif viewer to examine their gif frame by frame; or we can convert the gif to something like a mp4 file, though I think the former option is more practical.

@gallettilance
Copy link
Owner

stacked here is that one image is stacked on top of the other. The goal being to see which data point is going through the network at the same time that you see the activations for that point. I'm not sure I see how you can change the way they are stacked

Did you mean the number of frames in the gif? If so, I agree and have a fix locally where you can specify a parameter that limits the number of frames used. Ideally I would like to specify a size (like 25Mb since this is a common limit for gifs / images) and translate that to a number of frames. What do you think?

@gallettilance gallettilance added the enhancement New feature or request label Nov 29, 2021
@mcxxmc
Copy link
Collaborator Author

mcxxmc commented Nov 29, 2021

Oh I see.
I was saying the old gif shows the process of activation, while the new one shows all the activations at the same time. For example, if we have data point x and a model of 3 layers, then there were 3 sequential images showing each step of the activation; now all the activations are displayed in a single image, so basically 1 image for 1 data point x.
This is just a difference in displaying and I think I am ok with that change. I think the main point is the speed. The maximum size is a great idea, and I think we can also introduce another new parameter like the number of frames for each input data x.
Since we are stacking img of the same model, I believe the size of each img will not differ too much. So, by the time we get our first img, we can use the parameter to estimate the total size of the gif. I suggest that if the total size is smaller than the maximum size, then we use the total size; otherwise, we cut the parameter (number of frames for each x) to control the total size. Since we can easily figure out how many input data points we have, the trick should be some math here.
Please let me know if you have any questions.

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

No branches or pull requests

2 participants