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

The mnist.gif image #3

Open
ifgovh opened this issue Aug 1, 2019 · 3 comments
Open

The mnist.gif image #3

ifgovh opened this issue Aug 1, 2019 · 3 comments

Comments

@ifgovh
Copy link

ifgovh commented Aug 1, 2019

Hi,
I am wondering how do you plot the gif images. Mainly, how do you transfer the affine matrix to the red rhomboids in mnist.gif? It would be great if you kindly share the code.
Thank you very much!

Cheers,
Guozhang

@ethanwharris
Copy link
Owner

Hello,

The visualising code is in visualise.py. Specifically, the red_sqare method is used to make a red square of a certain side which must then be transformed with the same tansform as the sketch, this is done in the model code when draw_stages is True. The gif was not made with code, instead it's just a series of images that were stiched together with an online tool.

Hope that helps :)

@ifgovh
Copy link
Author

ifgovh commented Aug 2, 2019

Hi,
That really helps, thank you! The following question is how to access the images saved in state? When I used callbacks.MostRecent() to save state and loaded it, I only found 5 keys which are torchbearer_version, model, optimizer, history, callback_list. Where is the STAGES? Sorry, I am not familiar with torchbearer and I haven't found anything related in its doc.
Although I can save the tensor independently, I am curious how to do it in the framework of torchbearer.
Thank you for your help!

Cheers,
Guozhang

@ethanwharris
Copy link
Owner

Hi,

The way to do it in torchbearer would be to use a callback. There's a couple of options, either use the callback StagesGrid in visualise.py or use torchbearers MakeGrid callback or similar. The docs can bne found here or there's an example

Hope that helps :)

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

No branches or pull requests

2 participants