Commit 65da497f authored by Shining Sun's avatar Shining Sun
Browse files

Merge branch 'master' of https://github.com/tensorflow/models into cifar_keras

parents 93e0022d 7d032ea3
......@@ -21,7 +21,7 @@ from tensorflow.core.example import example_pb2
from tensorflow.core.example import feature_pb2
from tensorflow.python.framework import dtypes
from tensorflow.python.ops import parsing_ops
from lstm_object_detection import tf_sequence_example_decoder
from lstm_object_detection.inputs import tf_sequence_example_decoder
from object_detection.core import standard_fields as fields
......
......@@ -48,8 +48,8 @@ import os
from absl import flags
import tensorflow as tf
from lstm_object_detection import model_builder
from lstm_object_detection import seq_dataset_builder
from lstm_object_detection import trainer
from lstm_object_detection.inputs import seq_dataset_builder
from lstm_object_detection.utils import config_util
from object_detection.builders import preprocessor_builder
......
......@@ -23,6 +23,8 @@ oid_hierarchical_labels_expansion.py \
--annotation_type=<1 (for boxes) or 2 (for image-level labels)>
"""
from __future__ import print_function
import argparse
import json
......@@ -154,7 +156,7 @@ def main(parsed_args):
if parsed_args.annotation_type == 2:
labels_file = True
elif parsed_args.annotation_type != 1:
print '--annotation_type expected value is 1 or 2.'
print('--annotation_type expected value is 1 or 2.')
return -1
with open(parsed_args.input_annotations, 'r') as source:
with open(parsed_args.output_annotations, 'w') as target:
......
......@@ -208,7 +208,7 @@ For running the training Cloud ML job, we'll configure the cluster to use 5
training jobs and three parameters servers. The
configuration file can be found at `object_detection/samples/cloud/cloud.yml`.
Note: This sample is supported for use with 1.8 runtime version.
Note: The code sample below is supported for use with 1.9 runtime version.
To start training and evaluation, execute the following command from the
`tensorflow/models/research/` directory:
......@@ -216,7 +216,7 @@ To start training and evaluation, execute the following command from the
```bash
# From tensorflow/models/research/
gcloud ml-engine jobs submit training `whoami`_object_detection_pets_`date +%m_%d_%Y_%H_%M_%S` \
--runtime-version 1.8 \
--runtime-version 1.9 \
--job-dir=gs://${YOUR_GCS_BUCKET}/model_dir \
--packages dist/object_detection-0.1.tar.gz,slim/dist/slim-0.1.tar.gz,/tmp/pycocotools/pycocotools-2.0.tar.gz \
--module-name object_detection.model_main \
......@@ -248,6 +248,8 @@ web browser. You should see something similar to the following:
![](img/tensorboard.png)
Make sure your Tensorboard version is the same minor version as your Tensorflow (1.x)
You will also want to click on the images tab to see example detections made by
the model while it trains. After about an hour and a half of training, you can
expect to see something like this:
......
trainingInput:
runtimeVersion: "1.8"
runtimeVersion: "1.9"
scaleTier: CUSTOM
masterType: standard_gpu
workerCount: 5
......
......@@ -27,9 +27,8 @@ parser.add_argument('--train_steps', default=1000, type=int,
help='number of training steps')
def my_model(features, labels, mode, params):
"""DNN with three hidden layers, and dropout of 0.1 probability."""
# Create three fully connected layers each layer having a dropout
# probability of 0.1.
"""DNN with three hidden layers and learning_rate=0.1."""
# Create three fully connected layers.
net = tf.feature_column.input_layer(features, params['feature_columns'])
for units in params['hidden_units']:
net = tf.layers.dense(net, units=units, activation=tf.nn.relu)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment