Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
b807ff86
Commit
b807ff86
authored
May 06, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
May 06, 2020
Browse files
tensorflow.compat.v2 is no longer needed.
PiperOrigin-RevId: 310289012
parent
e2a41868
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
20 additions
and
27 deletions
+20
-27
official/vision/detection/dataloader/anchor.py
official/vision/detection/dataloader/anchor.py
+1
-1
official/vision/detection/dataloader/input_reader.py
official/vision/detection/dataloader/input_reader.py
+1
-1
official/vision/detection/dataloader/maskrcnn_parser.py
official/vision/detection/dataloader/maskrcnn_parser.py
+1
-1
official/vision/detection/dataloader/retinanet_parser.py
official/vision/detection/dataloader/retinanet_parser.py
+1
-8
official/vision/detection/dataloader/tf_example_decoder.py
official/vision/detection/dataloader/tf_example_decoder.py
+1
-1
official/vision/detection/evaluation/coco_evaluator.py
official/vision/detection/evaluation/coco_evaluator.py
+1
-1
official/vision/detection/evaluation/coco_utils.py
official/vision/detection/evaluation/coco_utils.py
+1
-1
official/vision/detection/executor/detection_executor.py
official/vision/detection/executor/detection_executor.py
+1
-1
official/vision/detection/main.py
official/vision/detection/main.py
+1
-1
official/vision/detection/modeling/architecture/fpn.py
official/vision/detection/modeling/architecture/fpn.py
+1
-1
official/vision/detection/modeling/architecture/heads.py
official/vision/detection/modeling/architecture/heads.py
+1
-1
official/vision/detection/modeling/architecture/nn_ops.py
official/vision/detection/modeling/architecture/nn_ops.py
+1
-1
official/vision/detection/modeling/architecture/resnet.py
official/vision/detection/modeling/architecture/resnet.py
+1
-1
official/vision/detection/modeling/base_model.py
official/vision/detection/modeling/base_model.py
+1
-1
official/vision/detection/modeling/checkpoint_utils.py
official/vision/detection/modeling/checkpoint_utils.py
+1
-1
official/vision/detection/modeling/learning_rates.py
official/vision/detection/modeling/learning_rates.py
+1
-1
official/vision/detection/modeling/losses.py
official/vision/detection/modeling/losses.py
+1
-1
official/vision/detection/modeling/maskrcnn_model.py
official/vision/detection/modeling/maskrcnn_model.py
+1
-1
official/vision/detection/modeling/optimizers.py
official/vision/detection/modeling/optimizers.py
+1
-1
official/vision/detection/modeling/retinanet_model.py
official/vision/detection/modeling/retinanet_model.py
+1
-1
No files found.
official/vision/detection/dataloader/anchor.py
View file @
b807ff86
...
@@ -19,7 +19,7 @@ from __future__ import division
...
@@ -19,7 +19,7 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
import
collections
import
collections
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.vision.detection.utils.object_detection
import
argmax_matcher
from
official.vision.detection.utils.object_detection
import
argmax_matcher
from
official.vision.detection.utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.detection.utils.object_detection
import
balanced_positive_negative_sampler
from
official.vision.detection.utils.object_detection
import
box_list
from
official.vision.detection.utils.object_detection
import
box_list
...
...
official/vision/detection/dataloader/input_reader.py
View file @
b807ff86
...
@@ -19,7 +19,7 @@ from __future__ import division
...
@@ -19,7 +19,7 @@ from __future__ import division
# from __future__ import google_type_annotations
# from __future__ import google_type_annotations
from
__future__
import
print_function
from
__future__
import
print_function
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
typing
import
Text
,
Optional
from
typing
import
Text
,
Optional
from
official.modeling.hyperparams
import
params_dict
from
official.modeling.hyperparams
import
params_dict
...
...
official/vision/detection/dataloader/maskrcnn_parser.py
View file @
b807ff86
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# ==============================================================================
# ==============================================================================
"""Data parser and processing for Mask R-CNN."""
"""Data parser and processing for Mask R-CNN."""
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.vision.detection.dataloader
import
anchor
from
official.vision.detection.dataloader
import
anchor
from
official.vision.detection.dataloader
import
mode_keys
as
ModeKeys
from
official.vision.detection.dataloader
import
mode_keys
as
ModeKeys
...
...
official/vision/detection/dataloader/retinanet_parser.py
View file @
b807ff86
...
@@ -21,12 +21,11 @@ T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollar
...
@@ -21,12 +21,11 @@ T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollar
Focal Loss for Dense Object Detection. arXiv:1708.02002
Focal Loss for Dense Object Detection. arXiv:1708.02002
"""
"""
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.vision.detection.dataloader
import
anchor
from
official.vision.detection.dataloader
import
anchor
from
official.vision.detection.dataloader
import
mode_keys
as
ModeKeys
from
official.vision.detection.dataloader
import
mode_keys
as
ModeKeys
from
official.vision.detection.dataloader
import
tf_example_decoder
from
official.vision.detection.dataloader
import
tf_example_decoder
from
official.vision.detection.utils
import
autoaugment_utils
from
official.vision.detection.utils
import
box_utils
from
official.vision.detection.utils
import
box_utils
from
official.vision.detection.utils
import
input_utils
from
official.vision.detection.utils
import
input_utils
...
@@ -217,12 +216,6 @@ class Parser(object):
...
@@ -217,12 +216,6 @@ class Parser(object):
# Gets original image and its size.
# Gets original image and its size.
image
=
data
[
'image'
]
image
=
data
[
'image'
]
# NOTE: The autoaugment method works best when used alongside the standard
# horizontal flipping of images along with size jittering and normalization.
if
self
.
_use_autoaugment
:
image
,
boxes
=
autoaugment_utils
.
distort_image_with_autoaugment
(
image
,
boxes
,
self
.
_autoaugment_policy_name
)
image_shape
=
tf
.
shape
(
input
=
image
)[
0
:
2
]
image_shape
=
tf
.
shape
(
input
=
image
)[
0
:
2
]
# Normalizes image with mean and std pixel values.
# Normalizes image with mean and std pixel values.
...
...
official/vision/detection/dataloader/tf_example_decoder.py
View file @
b807ff86
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
A decoder to decode string tensors containing serialized tensorflow.Example
A decoder to decode string tensors containing serialized tensorflow.Example
protos for object detection.
protos for object detection.
"""
"""
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
class
TfExampleDecoder
(
object
):
class
TfExampleDecoder
(
object
):
...
...
official/vision/detection/evaluation/coco_evaluator.py
View file @
b807ff86
...
@@ -36,7 +36,7 @@ import numpy as np
...
@@ -36,7 +36,7 @@ import numpy as np
from
absl
import
logging
from
absl
import
logging
from
pycocotools
import
cocoeval
from
pycocotools
import
cocoeval
import
six
import
six
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.vision.detection.evaluation
import
coco_utils
from
official.vision.detection.evaluation
import
coco_utils
from
official.vision.detection.utils
import
class_utils
from
official.vision.detection.utils
import
class_utils
...
...
official/vision/detection/evaluation/coco_utils.py
View file @
b807ff86
...
@@ -27,7 +27,7 @@ from PIL import Image
...
@@ -27,7 +27,7 @@ from PIL import Image
from
pycocotools
import
coco
from
pycocotools
import
coco
from
pycocotools
import
mask
as
mask_api
from
pycocotools
import
mask
as
mask_api
import
six
import
six
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.vision.detection.dataloader
import
tf_example_decoder
from
official.vision.detection.dataloader
import
tf_example_decoder
from
official.vision.detection.utils
import
box_utils
from
official.vision.detection.utils
import
box_utils
...
...
official/vision/detection/executor/detection_executor.py
View file @
b807ff86
...
@@ -21,7 +21,7 @@ from __future__ import print_function
...
@@ -21,7 +21,7 @@ from __future__ import print_function
from
absl
import
logging
from
absl
import
logging
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.modeling.training
import
distributed_executor
as
executor
from
official.modeling.training
import
distributed_executor
as
executor
from
official.vision.detection.utils.object_detection
import
visualization_utils
from
official.vision.detection.utils.object_detection
import
visualization_utils
...
...
official/vision/detection/main.py
View file @
b807ff86
...
@@ -25,7 +25,7 @@ from absl import logging
...
@@ -25,7 +25,7 @@ from absl import logging
import
functools
import
functools
import
os
import
os
import
pprint
import
pprint
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.modeling.hyperparams
import
params_dict
from
official.modeling.hyperparams
import
params_dict
from
official.modeling.training
import
distributed_executor
as
executor
from
official.modeling.training
import
distributed_executor
as
executor
...
...
official/vision/detection/modeling/architecture/fpn.py
View file @
b807ff86
...
@@ -26,7 +26,7 @@ from __future__ import print_function
...
@@ -26,7 +26,7 @@ from __future__ import print_function
import
functools
import
functools
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
tensorflow.python.keras
import
backend
from
tensorflow.python.keras
import
backend
from
official.vision.detection.modeling.architecture
import
nn_ops
from
official.vision.detection.modeling.architecture
import
nn_ops
...
...
official/vision/detection/modeling/architecture/heads.py
View file @
b807ff86
...
@@ -23,7 +23,7 @@ import pickle
...
@@ -23,7 +23,7 @@ import pickle
from
absl
import
logging
from
absl
import
logging
import
numpy
as
np
import
numpy
as
np
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
tensorflow.python.keras
import
backend
from
tensorflow.python.keras
import
backend
from
official.vision.detection.modeling.architecture
import
nn_ops
from
official.vision.detection.modeling.architecture
import
nn_ops
from
official.vision.detection.ops
import
spatial_transform_ops
from
official.vision.detection.ops
import
spatial_transform_ops
...
...
official/vision/detection/modeling/architecture/nn_ops.py
View file @
b807ff86
...
@@ -20,7 +20,7 @@ from __future__ import print_function
...
@@ -20,7 +20,7 @@ from __future__ import print_function
import
functools
import
functools
from
absl
import
logging
from
absl
import
logging
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
class
NormActivation
(
tf
.
keras
.
layers
.
Layer
):
class
NormActivation
(
tf
.
keras
.
layers
.
Layer
):
...
...
official/vision/detection/modeling/architecture/resnet.py
View file @
b807ff86
...
@@ -24,7 +24,7 @@ from __future__ import division
...
@@ -24,7 +24,7 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
from
absl
import
logging
from
absl
import
logging
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
tensorflow.python.keras
import
backend
from
tensorflow.python.keras
import
backend
from
official.vision.detection.modeling.architecture
import
nn_ops
from
official.vision.detection.modeling.architecture
import
nn_ops
...
...
official/vision/detection/modeling/base_model.py
View file @
b807ff86
...
@@ -21,7 +21,7 @@ from __future__ import print_function
...
@@ -21,7 +21,7 @@ from __future__ import print_function
import
abc
import
abc
import
functools
import
functools
import
re
import
re
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.vision.detection.modeling
import
checkpoint_utils
from
official.vision.detection.modeling
import
checkpoint_utils
from
official.vision.detection.modeling
import
learning_rates
from
official.vision.detection.modeling
import
learning_rates
from
official.vision.detection.modeling
import
optimizers
from
official.vision.detection.modeling
import
optimizers
...
...
official/vision/detection/modeling/checkpoint_utils.py
View file @
b807ff86
...
@@ -24,7 +24,7 @@ from __future__ import print_function
...
@@ -24,7 +24,7 @@ from __future__ import print_function
import
re
import
re
from
absl
import
logging
from
absl
import
logging
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
def
_build_assignment_map
(
keras_model
,
def
_build_assignment_map
(
keras_model
,
...
...
official/vision/detection/modeling/learning_rates.py
View file @
b807ff86
...
@@ -21,7 +21,7 @@ from __future__ import print_function
...
@@ -21,7 +21,7 @@ from __future__ import print_function
import
functools
import
functools
import
numpy
as
np
import
numpy
as
np
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
official.modeling.hyperparams
import
params_dict
from
official.modeling.hyperparams
import
params_dict
...
...
official/vision/detection/modeling/losses.py
View file @
b807ff86
...
@@ -19,7 +19,7 @@ from __future__ import division
...
@@ -19,7 +19,7 @@ from __future__ import division
from
__future__
import
print_function
from
__future__
import
print_function
from
absl
import
logging
from
absl
import
logging
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
def
focal_loss
(
logits
,
targets
,
alpha
,
gamma
,
normalizer
):
def
focal_loss
(
logits
,
targets
,
alpha
,
gamma
,
normalizer
):
...
...
official/vision/detection/modeling/maskrcnn_model.py
View file @
b807ff86
...
@@ -18,7 +18,7 @@ from __future__ import absolute_import
...
@@ -18,7 +18,7 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
print_function
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
tensorflow.python.keras
import
backend
from
tensorflow.python.keras
import
backend
from
official.vision.detection.dataloader
import
anchor
from
official.vision.detection.dataloader
import
anchor
...
...
official/vision/detection/modeling/optimizers.py
View file @
b807ff86
...
@@ -21,7 +21,7 @@ from __future__ import print_function
...
@@ -21,7 +21,7 @@ from __future__ import print_function
import
functools
import
functools
import
numpy
as
np
import
numpy
as
np
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
class
OptimizerFactory
(
object
):
class
OptimizerFactory
(
object
):
...
...
official/vision/detection/modeling/retinanet_model.py
View file @
b807ff86
...
@@ -21,7 +21,7 @@ from __future__ import print_function
...
@@ -21,7 +21,7 @@ from __future__ import print_function
import
collections
import
collections
import
numpy
as
np
import
numpy
as
np
from
absl
import
logging
from
absl
import
logging
import
tensorflow
.compat.v2
as
tf
import
tensorflow
as
tf
from
tensorflow.python.keras
import
backend
from
tensorflow.python.keras
import
backend
from
official.vision.detection.dataloader
import
mode_keys
from
official.vision.detection.dataloader
import
mode_keys
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment