Guest User

Untitled

a guest
Aug 10th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. //Build neural network
  2. model = tf.sequential();
  3. model.add(tf.layers.dense({inputShape: [documents.length], units: 100}));
  4. model.add(tf.layers.dense({units: 4}));
  5. model.compile({loss: 'categoricalCrossentropy', optimizer: 'sgd'});
  6.  
  7. model.fit(xs, ys, {epochs: 1000});
  8.  
  9. tf.layers.dense({inputShape: [xs.shape[0]], units: 100})
  10.  
  11. model.add(tf.layers.dense({inputShape: b, units: 100}));
  12.  
  13. model.add(tf.layers.dense({inputShape: [27, 48], units: 100}));
Add Comment
Please, Sign In to add comment