Imported from https://github.com/rahulbhalley/rnns-in-pytorch