diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-01-11 12:12:06 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-11 12:19:29 -0800 |
commit | 9698e9d86942e41915461f6649d209586b7e5b2d (patch) | |
tree | 44ae613d0ba8899a050843c826e2b1e86378055f /tensorflow/contrib/receptive_field | |
parent | 5c9ecbc32e17821506ee222fa2d4ce9c733a1248 (diff) |
Add missing tf.contrib.receptive_field dependencies.
PiperOrigin-RevId: 181643790
Diffstat (limited to 'tensorflow/contrib/receptive_field')
-rw-r--r-- | tensorflow/contrib/receptive_field/BUILD | 4 | ||||
-rw-r--r-- | tensorflow/contrib/receptive_field/README.md | 6 | ||||
-rw-r--r-- | tensorflow/contrib/receptive_field/python/util/examples/compute_rf.py | 2 | ||||
-rw-r--r-- | tensorflow/contrib/receptive_field/python/util/examples/rf_benchmark.py | 2 | ||||
-rw-r--r-- | tensorflow/contrib/receptive_field/python/util/receptive_field_test.py | 5 | ||||
-rw-r--r-- | tensorflow/contrib/receptive_field/receptive_field_api.py (renamed from tensorflow/contrib/receptive_field/__init__.py) | 6 |
6 files changed, 13 insertions, 12 deletions
diff --git a/tensorflow/contrib/receptive_field/BUILD b/tensorflow/contrib/receptive_field/BUILD index d16b2908a0..c67974c797 100644 --- a/tensorflow/contrib/receptive_field/BUILD +++ b/tensorflow/contrib/receptive_field/BUILD @@ -15,7 +15,6 @@ load("//tensorflow:tensorflow.bzl", "py_test") py_library( name = "receptive_field_pip", deps = [ - ":graph_compute_order_py", ":receptive_field_py", ], ) @@ -23,7 +22,6 @@ py_library( py_library( name = "graph_compute_order_py", srcs = [ - "__init__.py", "python/util/graph_compute_order.py", ], srcs_version = "PY2AND3", @@ -32,8 +30,8 @@ py_library( py_library( name = "receptive_field_py", srcs = [ - "__init__.py", "python/util/receptive_field.py", + "receptive_field_api.py", ], srcs_version = "PY2AND3", deps = [ diff --git a/tensorflow/contrib/receptive_field/README.md b/tensorflow/contrib/receptive_field/README.md index dfe53cdf14..3ff85faf61 100644 --- a/tensorflow/contrib/receptive_field/README.md +++ b/tensorflow/contrib/receptive_field/README.md @@ -17,7 +17,6 @@ For example, if your model is constructed using the function ```python import tensorflow as tf -from tensorflow.contrib import receptive_field # Construct graph. g = tf.Graph() @@ -27,7 +26,7 @@ with g.as_default(): # Compute receptive field parameters. rf_x, rf_y, eff_stride_x, eff_stride_y, eff_pad_x, eff_pad_y = \ - receptive_field.compute_receptive_field_from_graph_def( \ + tf.contrib.receptive_field.compute_receptive_field_from_graph_def( \ g.as_graph_def(), 'input_image', 'my_output_endpoint') ``` @@ -47,7 +46,6 @@ You can then compute the receptive field parameters for Inception-Resnet-v2 as: ```python from nets import inception import tensorflow as tf -from tensorflow.contrib import receptive_field # Construct graph. g = tf.Graph() @@ -57,7 +55,7 @@ with g.as_default(): # Compute receptive field parameters. rf_x, rf_y, eff_stride_x, eff_stride_y, eff_pad_x, eff_pad_y = \ - receptive_field.compute_receptive_field_from_graph_def( \ + tf.contrib.receptive_field.compute_receptive_field_from_graph_def( \ g.as_graph_def(), 'input_image', 'InceptionResnetV2/Conv2d_7b_1x1/Relu') ``` diff --git a/tensorflow/contrib/receptive_field/python/util/examples/compute_rf.py b/tensorflow/contrib/receptive_field/python/util/examples/compute_rf.py index 1cf978b90a..d6fdd12bbe 100644 --- a/tensorflow/contrib/receptive_field/python/util/examples/compute_rf.py +++ b/tensorflow/contrib/receptive_field/python/util/examples/compute_rf.py @@ -26,7 +26,7 @@ import sys from google.protobuf import text_format -from tensorflow.contrib import receptive_field +from tensorflow.contrib.receptive_field import receptive_field_api as receptive_field from tensorflow.core.framework import graph_pb2 from tensorflow.python.platform import app from tensorflow.python.platform import gfile diff --git a/tensorflow/contrib/receptive_field/python/util/examples/rf_benchmark.py b/tensorflow/contrib/receptive_field/python/util/examples/rf_benchmark.py index 5db8dacdc8..cd16abd5ab 100644 --- a/tensorflow/contrib/receptive_field/python/util/examples/rf_benchmark.py +++ b/tensorflow/contrib/receptive_field/python/util/examples/rf_benchmark.py @@ -29,8 +29,8 @@ import csv import sys from tensorflow.contrib import framework -from tensorflow.contrib import receptive_field from tensorflow.contrib import slim +from tensorflow.contrib.receptive_field import receptive_field_api as receptive_field from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops diff --git a/tensorflow/contrib/receptive_field/python/util/receptive_field_test.py b/tensorflow/contrib/receptive_field/python/util/receptive_field_test.py index 55a010f87f..1ea72c0f29 100644 --- a/tensorflow/contrib/receptive_field/python/util/receptive_field_test.py +++ b/tensorflow/contrib/receptive_field/python/util/receptive_field_test.py @@ -18,8 +18,10 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function +import numpy as np + from tensorflow.contrib import slim -from tensorflow.contrib.receptive_field.python.util import receptive_field +from tensorflow.contrib.receptive_field import receptive_field_api as receptive_field from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops @@ -27,7 +29,6 @@ from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import gen_math_ops from tensorflow.python.ops import nn from tensorflow.python.platform import test -import numpy as np # TODO(andrearaujo): Rename the create_test_network_* functions in order to have diff --git a/tensorflow/contrib/receptive_field/__init__.py b/tensorflow/contrib/receptive_field/receptive_field_api.py index 10745a6a53..4d81b4292d 100644 --- a/tensorflow/contrib/receptive_field/__init__.py +++ b/tensorflow/contrib/receptive_field/receptive_field_api.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== -"""Module to compute receptive field parameters for CNN tensorflow models.""" +"""Module that declares the functions in tf.contrib.receptive_field's API.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function @@ -21,3 +21,7 @@ from __future__ import print_function from tensorflow.contrib.receptive_field.python.util.graph_compute_order import get_compute_order from tensorflow.contrib.receptive_field.python.util.receptive_field import compute_receptive_field_from_graph_def # pylint: enable=unused-import + +del absolute_import +del division +del print_function |