"csrc/cuda/diag.cpp" did not exist on "96b0abcbc6b23ebda08214f2950e41f2d8b6bab3"
Unverified Commit 3f78f4cf authored by derekjchow's avatar derekjchow Committed by GitHub
Browse files

Merge pull request #3494 from pkulzc/master

Update object detection with internal changes and remove unused BUILD files.
parents 73748d01 0319908c
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""A convenience wrapper around tf.test.TestCase to enable TPU tests.""" """A convenience wrapper around tf.test.TestCase to enable TPU tests."""
import tensorflow as tf import tensorflow as tf
...@@ -33,7 +47,9 @@ class TestCase(tf.test.TestCase): ...@@ -33,7 +47,9 @@ class TestCase(tf.test.TestCase):
materialized_results = sess.run(tpu_computation, materialized_results = sess.run(tpu_computation,
feed_dict=dict(zip(placeholders, inputs))) feed_dict=dict(zip(placeholders, inputs)))
sess.run(tpu.shutdown_system()) sess.run(tpu.shutdown_system())
if len(materialized_results) == 1: if (len(materialized_results) == 1
and (isinstance(materialized_results, list)
or isinstance(materialized_results, tuple))):
materialized_results = materialized_results[0] materialized_results = materialized_results[0]
return materialized_results return materialized_results
...@@ -56,7 +72,9 @@ class TestCase(tf.test.TestCase): ...@@ -56,7 +72,9 @@ class TestCase(tf.test.TestCase):
tf.local_variables_initializer()]) tf.local_variables_initializer()])
materialized_results = sess.run(results, feed_dict=dict(zip(placeholders, materialized_results = sess.run(results, feed_dict=dict(zip(placeholders,
inputs))) inputs)))
if len(materialized_results) == 1: if (len(materialized_results) == 1
and (isinstance(materialized_results, list)
or isinstance(materialized_results, tuple))):
materialized_results = materialized_results[0] materialized_results = materialized_results[0]
return materialized_results return materialized_results
......
...@@ -23,7 +23,7 @@ import tensorflow as tf ...@@ -23,7 +23,7 @@ import tensorflow as tf
slim = tf.contrib.slim slim = tf.contrib.slim
# TODO: Consider replacing with tf.contrib.filter_variables in # TODO(derekjchow): Consider replacing with tf.contrib.filter_variables in
# tensorflow/contrib/framework/python/ops/variables.py # tensorflow/contrib/framework/python/ops/variables.py
def filter_variables(variables, filter_regex_list, invert=False): def filter_variables(variables, filter_regex_list, invert=False):
"""Filters out the variables matching the filter_regex. """Filters out the variables matching the filter_regex.
...@@ -104,7 +104,7 @@ def get_variables_available_in_checkpoint(variables, ...@@ -104,7 +104,7 @@ def get_variables_available_in_checkpoint(variables,
Inspects given checkpoint and returns the subset of variables that are Inspects given checkpoint and returns the subset of variables that are
available in it. available in it.
TODO: force input and output to be a dictionary. TODO(rathodv): force input and output to be a dictionary.
Args: Args:
variables: a list or dictionary of variables to find in checkpoint. variables: a list or dictionary of variables to find in checkpoint.
......
...@@ -13,12 +13,7 @@ ...@@ -13,12 +13,7 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
"""Tests for image.understanding.object_detection.core.visualization_utils. """Tests for object_detection.utils.visualization_utils."""
Testing with visualization in the following colab:
https://drive.google.com/a/google.com/file/d/0B5HnKS_hMsNARERpU3MtU3I5RFE/view?usp=sharing
"""
import logging import logging
import os import os
......
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