Skip to content

Commit 7269d08

Browse files
authored
Merge pull request MorvanZhou#45 from EmbraceLife/master
update Dense with units
2 parents 2072e89 + 309b821 commit 7269d08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kerasTUT/4-regressor_example.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929

3030
# build a neural network from the 1st layer to the last layer
3131
model = Sequential()
32-
model.add(Dense(output_dim=1, input_dim=1))
32+
33+
model.add(Dense(units=1, input_dim=1))
3334

3435
# choose loss function and optimizing method
3536
model.compile(loss='mse', optimizer='sgd')
@@ -52,4 +53,4 @@
5253
Y_pred = model.predict(X_test)
5354
plt.scatter(X_test, Y_test)
5455
plt.plot(X_test, Y_pred)
55-
plt.show()
56+
plt.show()

0 commit comments

Comments
 (0)