Skip to content

Commit

Permalink
add seed to Activit 3.02
Browse files Browse the repository at this point in the history
  • Loading branch information
moocarme committed Jan 10, 2020
1 parent 748bacb commit 0dfd573
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions Chapter03/Activity3.02/Activity3_02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
],
"source": [
"np.random.seed(seed)\n",
"\n",
"random.set_seed(seed)\n",
"# define the keras model\n",
"classifier = Sequential()\n",
"classifier.add(Dense(units = 3, activation = 'tanh', input_dim=X_train.shape[1]))\n",
Expand Down Expand Up @@ -269,13 +269,7 @@
"997/997 [==============================] - 0s 48us/step - loss: 0.6854 - accuracy: 0.5617 - val_loss: 0.6730 - val_accuracy: 0.6036\n",
"Epoch 56/100\n",
"997/997 [==============================] - 0s 51us/step - loss: 0.6852 - accuracy: 0.5627 - val_loss: 0.6730 - val_accuracy: 0.5946\n",
"Epoch 57/100\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 57/100\n",
"997/997 [==============================] - 0s 49us/step - loss: 0.6850 - accuracy: 0.5637 - val_loss: 0.6729 - val_accuracy: 0.5946\n",
"Epoch 58/100\n",
"997/997 [==============================] - 0s 48us/step - loss: 0.6849 - accuracy: 0.5607 - val_loss: 0.6729 - val_accuracy: 0.5946\n",
Expand Down Expand Up @@ -597,13 +591,7 @@
"997/997 [==============================] - 0s 53us/step - loss: 0.6918 - accuracy: 0.5316 - val_loss: 0.6894 - val_accuracy: 0.5225\n",
"Epoch 56/100\n",
"997/997 [==============================] - 0s 52us/step - loss: 0.6917 - accuracy: 0.5316 - val_loss: 0.6894 - val_accuracy: 0.5315\n",
"Epoch 57/100\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 57/100\n",
"997/997 [==============================] - 0s 52us/step - loss: 0.6917 - accuracy: 0.5306 - val_loss: 0.6894 - val_accuracy: 0.5315\n",
"Epoch 58/100\n",
"997/997 [==============================] - 0s 54us/step - loss: 0.6916 - accuracy: 0.5296 - val_loss: 0.6894 - val_accuracy: 0.5225\n",
Expand Down

0 comments on commit 0dfd573

Please sign in to comment.