Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Last active March 16, 2019 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/58bd008d5248558cdf7689ea1606efe8 to your computer and use it in GitHub Desktop.
Save NMZivkovic/58bd008d5248558cdf7689ea1606efe8 to your computer and use it in GitHub Desktop.
/**
* @desc creates tensorflow graph
* @return model
*/
function createModelFunction() {
const model = tf.sequential();
model.add(tf.layers.dense({inputShape: [11], units: 50, useBias: true, activation: 'relu'}));
model.add(tf.layers.dense({units: 30, useBias: true, activation: 'tanh'}));
model.add(tf.layers.dense({units: 20, useBias: true, activation: 'relu'}));
model.add(tf.layers.dense({units: 10, useBias: true, activation: 'softmax'}));
return model;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment