Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Build neural network
- model = tf.sequential();
- model.add(tf.layers.dense({inputShape: [documents.length], units: 100}));
- model.add(tf.layers.dense({units: 4}));
- model.compile({loss: 'categoricalCrossentropy', optimizer: 'sgd'});
- model.fit(xs, ys, {epochs: 1000});
- tf.layers.dense({inputShape: [xs.shape[0]], units: 100})
- model.add(tf.layers.dense({inputShape: b, units: 100}));
- model.add(tf.layers.dense({inputShape: [27, 48], units: 100}));
Add Comment
Please, Sign In to add comment