This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
cs501r_f2018:lab6 [2018/10/09 19:11] sadler [Description:] |
cs501r_f2018:lab6 [2021/06/30 23:42] (current) |
||
|---|---|---|---|
| Line 76: | Line 76: | ||
| [[http://colah.github.io/posts/2015-08-Understanding-LSTMs/|Understanding LSTM Networks]] | [[http://colah.github.io/posts/2015-08-Understanding-LSTMs/|Understanding LSTM Networks]] | ||
| + | |||
| + | <code bash> | ||
| + | ! wget -O ./text_files.tar.gz 'https://piazza.com/redirect/s3?bucket=uploads&prefix=attach%2Fjlifkda6h0x5bk%2Fhzosotq4zil49m%2Fjn13x09arfeb%2Ftext_files.tar.gz' | ||
| + | ! tar -xzf text_files.tar.gz | ||
| + | ! pip install unidecode | ||
| + | ! pip install torch | ||
| + | </code> | ||
| + | |||
| + | |||
| <code python> | <code python> | ||
| Line 147: | Line 156: | ||
| if epoch % print_every == 0: | if epoch % print_every == 0: | ||
| - | print('[%s (%d %d%%) %.4f]' % (time_since(start), epoch, epoch / n_epochs * 100, loss_)) | + | print('[%s (%d %d%%) %.4f]' % (time.time() - start, epoch, epoch / n_epochs * 100, loss_)) |
| print(evaluate('Wh', 100), '\n') | print(evaluate('Wh', 100), '\n') | ||