November 2018 archive

Specify Target File in git cherry-pick

Cherry-picking with git could easily become a nightmare if some files are renamed or the directory structure of the project is changed. In these cases, it is often helpful to cherry-pick the problematic files individually. Fortunately, this can be done in a few easy steps: Create a patch file for that individual file: git show …

Continue reading

Use PyTorch’s DataLoader with Variable Length Sequences for LSTM/GRU

When I first started using PyTorch to implement recurrent neural networks (RNN), I faced a small issue when I was trying to use DataLoader in conjunction with variable-length sequences. What I specifically wanted to do was to automate the process of distributing training data among multiple graphics cards. Even though there are numerous examples online …

Continue reading