Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- neural = {
- net : new convnetjs.Net(),
- layer_defs : [
- {type:'input', out_sx:4, out_sy:4, out_depth:1},
- {type:'fc', num_neurons:25, activation:"regression"},
- {type:'regression', num_neurons:5}
- ],
- neuralDepth: 1
- }
- #---Build Model-----
- model = models.Sequential()
- # Input - Layer
- model.add(layers.Dense(4, activation = "relu", input_shape=(4,)))
- # Hidden - Layers
- model.add(layers.Dense(25, activation = "relu"))
- model.add(layers.Dense(5, activation = "relu"))
- # Output- Layer
- model.add(layers.Dense(1, activation = "linear"))
- model.summary()
- # Compile Model
- model.compile(loss= "mean_squared_error" , optimizer="adam", metrics=["mean_squared_error"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement