Skip to content

Commit df47b11

Browse files
authored
Merge pull request aws#14 from awslabs/mvs-update-to-TF104
Update to TF 1.0.4
2 parents b1e327a + fc94dc5 commit df47b11

File tree

1 file changed

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

1 file changed

+3
-4
lines changed

sagemaker-python-sdk/tensorflow_abalone_age_predictor_using_keras/abalone.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import numpy as np
22
import os
33
import tensorflow as tf
4-
from tensorflow.contrib.keras.python.keras.layers import Dense
54
from tensorflow.python.estimator.export.export import build_raw_serving_input_receiver_fn
65
from tensorflow.python.estimator.export.export_output import PredictOutput
76

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

2322
# 1. Configure the model via Keras functional api
2423

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)
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)
2827

2928
predictions = tf.reshape(output_layer, [-1])
3029

0 commit comments

Comments
 (0)