Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. const model = tf.sequential();
  2.  
  3. // Add layers to the model
  4. model.add(tf.layers.dense({
  5. inputShape: [512],
  6. activation: 'sigmoid',
  7. units: 2,
  8. }));
  9.  
  10. model.add(tf.layers.dense({
  11. inputShape: [2],
  12. activation: 'sigmoid',
  13. units: 2,
  14. }));
  15.  
  16. model.add(tf.layers.dense({
  17. inputShape: [2],
  18. activation: 'sigmoid',
  19. units: 2,
  20. }));
  21.  
  22. // Compile the model
  23. model.compile({
  24. loss: 'meanSquaredError',
  25. optimizer: tf.train.adam(.06), // This is a standard compile config
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement