practical-pytorch icon indicating copy to clipboard operation
practical-pytorch copied to clipboard

Batching tutorial with the Character-Level Names classification

Open ngarneau opened this issue 7 years ago • 8 comments

Hey Sean, Thanks for your awesome tutorials it really helps to understand how PyTorch works under the hood. I created a little demo where I added some visualizations when we batch inputs into an LSTM for the Character-Level Names Classification. Just wanted to let you know in case you want to add some parts or the demo as a whole within your tutorials. Cheers, Nicolas

ngarneau avatar Oct 31 '17 15:10 ngarneau

@ngarneau Wow this demo (matrix visualization) is amazing. I have two questions for you.

  1. I am making slides for RNN (http://bit.ly/PyTorchZeroAll). May I use your matrix visualization in my slides (with your name credit?)

  2. I am also working on a simple seq2seq model for a tutorial based on the code in this repos (https://github.com/hunkim/PyTorchZeroToAll/blob/master/13_1_seq2seq.py). Are you interested in visualizing the metrics used in the seq2seq code?

Once again, it's really amazing to see your wonderful visualization.

hunkim avatar Nov 01 '17 06:11 hunkim

Hey @hunkim, Thanks for your comment and please, use any of my content within your slides I'd be more than happy :) It would be a pleasure for me to design visualizations for your seq2seq model. It may take a couple of days since I haven't been through one thoroughly yet but it should not be that long. By the way, your slides are great! I think we are on the same page on "visualizing what the code does" exactly. Many thanks, Nicolas

ngarneau avatar Nov 01 '17 13:11 ngarneau

@ngarneau Take your time. I'll finalize my slides and video lectures next week. I really appreciate it.

hunkim avatar Nov 01 '17 13:11 hunkim

@ngarneau Do you know how to use pack-pad for decoder? In the example in this repos, he only used pack-pad in the encoder, but the decoder is just batch based loop.

hunkim avatar Nov 02 '17 03:11 hunkim

@hunkim actually no but I'll give it a look this weekend!

ngarneau avatar Nov 02 '17 16:11 ngarneau

FYI, I also added data parallel. Please check it out at https://github.com/hunkim/PyTorchZeroToAll/blob/master/12_4_name_classify.py.

hunkim avatar Nov 03 '17 06:11 hunkim

That is really cool! Thanks :)

ngarneau avatar Nov 03 '17 12:11 ngarneau

@ngarneau However, for this small dataset, it actually takes more time. :-)

hunkim avatar Nov 03 '17 12:11 hunkim