Skip to content

Commit 3e55405

Browse files
committed
Bug fix
1 parent 58a10aa commit 3e55405

File tree

2 files changed

+4
-56
lines changed

2 files changed

+4
-56
lines changed

0_Running_TensorFlow_In_SageMaker.ipynb

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -61,61 +61,9 @@
6161
},
6262
{
6363
"cell_type": "code",
64-
"execution_count": 1,
64+
"execution_count": null,
6565
"metadata": {},
66-
"outputs": [
67-
{
68-
"name": "stdout",
69-
"output_type": "stream",
70-
"text": [
71-
"Using TensorFlow backend.\n",
72-
"2019-07-08 09:11:31.335035: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX512F\n",
73-
"2019-07-08 09:11:31.357245: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2500000000 Hz\n",
74-
"2019-07-08 09:11:31.357494: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x56093ec8b4a0 executing computations on platform Host. Devices:\n",
75-
"2019-07-08 09:11:31.357516: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined>\n",
76-
"2019-07-08 09:11:31.357709: I tensorflow/core/common_runtime/process_util.cc:71] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.\n",
77-
"INFO:root:getting data\n",
78-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py:3632: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
79-
"Instructions for updating:\n",
80-
"Colocations handled automatically by placer.\n",
81-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py:3632: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
82-
"Instructions for updating:\n",
83-
"Colocations handled automatically by placer.\n",
84-
"INFO:root:configuring model\n",
85-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
86-
"Instructions for updating:\n",
87-
"Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
88-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
89-
"Instructions for updating:\n",
90-
"Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
91-
"INFO:root:Starting training\n",
92-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
93-
"Instructions for updating:\n",
94-
"Use tf.cast instead.\n",
95-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
96-
"Instructions for updating:\n",
97-
"Use tf.cast instead.\n",
98-
"Train on 128 samples, validate on 128 samples\n",
99-
"Epoch 1/1\n",
100-
"312/312 [==============================] - 90s 290ms/step - loss: 1.8190 - acc: 0.3313 - val_loss: 1.8570 - val_acc: 0.3467\n",
101-
"INFO:root:Test loss:1.8503627074070466\n",
102-
"INFO:root:Test accuracy:0.3541666666666667\n",
103-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow/python/saved_model/signature_def_utils_impl.py:205: build_tensor_info (from tensorflow.python.saved_model.utils_impl) is deprecated and will be removed in a future version.\n",
104-
"Instructions for updating:\n",
105-
"This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.\n",
106-
"WARNING:tensorflow:From /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages/tensorflow/python/saved_model/signature_def_utils_impl.py:205: build_tensor_info (from tensorflow.python.saved_model.utils_impl) is deprecated and will be removed in a future version.\n",
107-
"Instructions for updating:\n",
108-
"This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.\n",
109-
"INFO:tensorflow:No assets to save.\n",
110-
"INFO:tensorflow:No assets to save.\n",
111-
"INFO:tensorflow:No assets to write.\n",
112-
"INFO:tensorflow:No assets to write.\n",
113-
"INFO:tensorflow:SavedModel written to: ./logs/1/saved_model.pb\n",
114-
"INFO:tensorflow:SavedModel written to: ./logs/1/saved_model.pb\n",
115-
"INFO:root:Model successfully saved at: ./logs\n"
116-
]
117-
}
118-
],
66+
"outputs": [],
11967
"source": [
12068
"!mkdir -p logs\n",
12169
"!python training_script/cifar10_keras.py --model_dir ./logs \\\n",
@@ -369,5 +317,5 @@
369317
}
370318
},
371319
"nbformat": 4,
372-
"nbformat_minor": 2
320+
"nbformat_minor": 4
373321
}

training_script/cifar10_keras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from keras.models import Sequential
2727
from keras.optimizers import Adam, SGD, RMSprop
2828
import tensorflow as tf
29-
# from keras import backend as K
29+
from keras import backend as K
3030

3131
sess = tf.Session()
3232
K.set_session(sess)

0 commit comments

Comments
 (0)