Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. neural = {
  2. net : new convnetjs.Net(),
  3. layer_defs : [
  4. {type:'input', out_sx:4, out_sy:4, out_depth:1},
  5. {type:'fc', num_neurons:25, activation:"regression"},
  6. {type:'regression', num_neurons:5}
  7. ],
  8. neuralDepth: 1
  9. }
  10.  
  11. #---Build Model-----
  12. model = models.Sequential()
  13. # Input - Layer
  14. model.add(layers.Dense(4, activation = "relu", input_shape=(4,)))
  15. # Hidden - Layers
  16. model.add(layers.Dense(25, activation = "relu"))
  17. model.add(layers.Dense(5, activation = "relu"))
  18. # Output- Layer
  19. model.add(layers.Dense(1, activation = "linear"))
  20. model.summary()
  21. # Compile Model
  22. model.compile(loss= "mean_squared_error" , optimizer="adam", metrics=["mean_squared_error"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement