Skip to content

Instantly share code, notes, and snippets.

@llSourcell
Created April 18, 2018 01:32
Show Gist options
  • Select an option

  • Save llSourcell/b0649ec755ce834dfee3da39a473908a to your computer and use it in GitHub Desktop.

Select an option

Save llSourcell/b0649ec755ce834dfee3da39a473908a to your computer and use it in GitHub Desktop.
const model = tf.sequential();
model.add(
tf.layers.simpleRNN({
units: 20,
recurrentInitializer: 'GlorotNormal',
inputShape: [80, 4]
})
);
const optimizer = tf.train.sgd(LEARNING_RATE);
model.compile({optimizer, loss: 'categoricalCrossentropy'});
model.fit({x: data, y: labels)});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment