Closed zkailinzhang closed 6 years ago
High-level Tensorflow (tf.layers) This version is is for models built using the tf.layers high-level API and wrapped in a tf.estimator.Estimator interface.
def model_fn(features, labels, mode):
logits = tf.layers.dense(Y4, 200, use_bias=False) bn = tf.layers.batch_normalization(logits, axis=1, center=True, scale=False, training=(mode == tf.estimator.ModeKeys.TRAIN)) Y5 = tf.nn.relu(bn) # ... more neural network layers ...
A complete sample is available in mlengine/trainer/task.py
mlengine/trainer/task.py theweb link is 404
https://github.com/GoogleCloudPlatform/tensorflow-without-a-phd/blob/master/tensorflow-mnist-tutorial/mlengine/trainer/task.py
High-level Tensorflow (tf.layers) This version is is for models built using the tf.layers high-level API and wrapped in a tf.estimator.Estimator interface.
def model_fn(features, labels, mode):
... neural network layers ...
A complete sample is available in mlengine/trainer/task.py
mlengine/trainer/task.py theweb link is 404