Commit b807ff86 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

tensorflow.compat.v2 is no longer needed.

PiperOrigin-RevId: 310289012
parent e2a41868
......@@ -18,7 +18,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils import box_utils
......
......@@ -19,7 +19,7 @@ from __future__ import division
from __future__ import print_function
import functools
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.ops import nms
from official.vision.detection.utils import box_utils
......
......@@ -18,7 +18,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.ops import nms
from official.vision.detection.utils import box_utils
......
......@@ -18,7 +18,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
import tensorflow as tf
_EPSILON = 1e-8
......
......@@ -18,7 +18,7 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.ops import spatial_transform_ops
from official.vision.detection.utils import box_utils
......
# Copyright 2019 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.
# ==============================================================================
"""AutoAugment util file."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
def distort_image_with_autoaugment(image, bboxes, augmentation_name):
raise NotImplementedError("Not TF 2.0 ready.")
......@@ -20,7 +20,7 @@ from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow.compat.v2 as tf
import tensorflow as tf
EPSILON = 1e-8
BBOX_XFORM_CLIP = np.log(1000. / 16.)
......
......@@ -14,7 +14,7 @@
# ==============================================================================
"""Utility functions for dataloader."""
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils import input_utils
......
......@@ -26,7 +26,7 @@ This matcher is used in Fast(er)-RCNN.
Note: matchers are used in TargetAssigners. There is a create_target_assigner
factory function for popular implementations.
"""
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils.object_detection import matcher
from official.vision.detection.utils.object_detection import shape_utils
......
......@@ -32,7 +32,7 @@ when number of examples set to True in indicator is less than batch_size.
This is originally implemented in TensorFlow Object Detection API.
"""
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils.object_detection import minibatch_sampler
from official.vision.detection.utils.object_detection import ops
......
......@@ -30,7 +30,7 @@ from abc import ABCMeta
from abc import abstractmethod
from abc import abstractproperty
import tensorflow.compat.v2 as tf
import tensorflow as tf
# Box coder types.
......
......@@ -34,7 +34,7 @@ Some other notes:
* Tensors are always provided as (flat) [N, 4] tensors.
"""
import tensorflow.compat.v2 as tf
import tensorflow as tf
class BoxList(object):
......
......@@ -28,7 +28,7 @@ from __future__ import division
from __future__ import print_function
from six.moves import range
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils.object_detection import box_list
from official.vision.detection.utils.object_detection import ops
......
......@@ -28,7 +28,7 @@ Faster RCNN box coder follows the coding schema described below:
See http://arxiv.org/abs/1506.01497 for details.
"""
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils.object_detection import box_coder
from official.vision.detection.utils.object_detection import box_list
......
......@@ -34,7 +34,7 @@ to query the results.
from abc import ABCMeta
from abc import abstractmethod
import tensorflow.compat.v2 as tf
import tensorflow as tf
class Match(object):
......
......@@ -33,7 +33,7 @@ This is originally implemented in TensorFlow Object Detection API.
from abc import ABCMeta
from abc import abstractmethod
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils.object_detection import ops
......
......@@ -18,7 +18,7 @@
This is originally implemented in TensorFlow Object Detection API.
"""
import tensorflow.compat.v2 as tf
import tensorflow as tf
from official.vision.detection.utils.object_detection import shape_utils
......
......@@ -39,7 +39,7 @@ we pass it to the functions. At the end of the preprocess we expand the image
back to rank 4.
"""
import tensorflow.compat.v2 as tf
import tensorflow as tf
import numpy as np
......
......@@ -21,7 +21,7 @@ between the boxes in two BoxLists.
from abc import ABCMeta
from abc import abstractmethod
import tensorflow.compat.v2 as tf
import tensorflow as tf
def area(boxlist, scope=None):
......
......@@ -15,7 +15,7 @@
"""Utils used to manipulate tensor shapes."""
import tensorflow.compat.v2 as tf
import tensorflow as tf
def assert_shape_equal(shape_a, shape_b):
......
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