Skip to content

Commit

Permalink
Merge pull request #45 from EmbraceLife/master
Browse files Browse the repository at this point in the history
update Dense with units
  • Loading branch information
MorvanZhou authored May 13, 2017
2 parents 2072e89 + 309b821 commit 7269d08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kerasTUT/4-regressor_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

# build a neural network from the 1st layer to the last layer
model = Sequential()
model.add(Dense(output_dim=1, input_dim=1))

model.add(Dense(units=1, input_dim=1))

# choose loss function and optimizing method
model.compile(loss='mse', optimizer='sgd')
Expand All @@ -52,4 +53,4 @@
Y_pred = model.predict(X_test)
plt.scatter(X_test, Y_test)
plt.plot(X_test, Y_pred)
plt.show()
plt.show()

0 comments on commit 7269d08

Please sign in to comment.