Guest User

Untitled

a guest
Nov 21st, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. const model = tf.sequential();
  2.  
  3. const hidden = tf.layers.dense({
  4. units: 3,
  5. inputShape: [3] //Each input has 3 values r, g, and b
  6. });
  7. const output = tf.layers.dense({
  8. units: 1 //only one output (the color that corresponds to the rgb values
  9. });
  10. model.add(hidden);
  11. model.add(output);
  12.  
  13. model.compile({
  14. activation: 'sigmoid',
  15. loss: "meanSquaredError",
  16. optimizer: tf.train.sgd(0.005)
  17. });
Add Comment
Please, Sign In to add comment