Skip to content

Instantly share code, notes, and snippets.

View qwfy's full-sized avatar

Incomplete qwfy

View GitHub Profile
@qwfy
qwfy / understanding-word-vectors.ipynb
Created March 3, 2018 02:24 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qwfy
qwfy / lstm_states.py
Last active November 18, 2017 16:14
LSTM states wiring in Keras
"""
When using Keras' LSTM with a batch of samples for the first
time, the wiring of the states between elements in one sequence,
and between sequences in one batch, is not a obvious thing.
This document attempts to clarify this.
Assumes that keras.recurrent.LSTM's stateful parameter is set
to False.