Skip to content

Commit d4e7c6e

Browse files
authored
Merge pull request aws#15 from awslabs/revert-14-mvs-update-to-TF104
Revert "Update to TF 1.0.4"
2 parents 492a788 + e1b119e commit d4e7c6e

File tree

1 file changed

+4
-3
lines changed
  • sagemaker-python-sdk/tensorflow_abalone_age_predictor_using_keras

1 file changed

+4
-3
lines changed

sagemaker-python-sdk/tensorflow_abalone_age_predictor_using_keras/abalone.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import numpy as np
22
import os
33
import tensorflow as tf
4+
from tensorflow.contrib.keras.python.keras.layers import Dense
45
from tensorflow.python.estimator.export.export import build_raw_serving_input_receiver_fn
56
from tensorflow.python.estimator.export.export_output import PredictOutput
67

@@ -21,9 +22,9 @@ def model_fn(features, labels, mode, params):
2122

2223
# 1. Configure the model via Keras functional api
2324

24-
first_hidden_layer = tf.keras.layers.Dense(10, activation='relu', name='first-layer')(features[INPUT_TENSOR_NAME])
25-
second_hidden_layer = tf.keras.layers.Dense(10, activation='relu')(first_hidden_layer)
26-
output_layer = tf.keras.layers.Dense(1, activation='linear')(second_hidden_layer)
25+
first_hidden_layer = Dense(10, activation='relu', name='first-layer')(features[INPUT_TENSOR_NAME])
26+
second_hidden_layer = Dense(10, activation='relu')(first_hidden_layer)
27+
output_layer = Dense(1, activation='linear')(second_hidden_layer)
2728

2829
predictions = tf.reshape(output_layer, [-1])
2930

0 commit comments

Comments
 (0)