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
24310ad1
Commit
24310ad1
authored
Jun 24, 2020
by
A. Unique TensorFlower
Browse files
Merge pull request #8717 from freezestudio:patch-1
PiperOrigin-RevId: 318176474
parents
a64bc1bd
28a18f7f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
official/vision/detection/dataloader/maskrcnn_parser.py
official/vision/detection/dataloader/maskrcnn_parser.py
+3
-3
No files found.
official/vision/detection/dataloader/maskrcnn_parser.py
View file @
24310ad1
...
...
@@ -185,12 +185,12 @@ class Parser(object):
is_crowds
=
data
[
'groundtruth_is_crowd'
]
# Skips annotations with `is_crowd` = True.
if
self
.
_skip_crowd_during_training
and
self
.
_is_training
:
num_groundtr
t
uhs
=
tf
.
shape
(
classes
)[
0
]
with
tf
.
control_dependencies
([
num_groundtr
t
uhs
,
is_crowds
]):
num_groundtru
t
hs
=
tf
.
shape
(
classes
)[
0
]
with
tf
.
control_dependencies
([
num_groundtru
t
hs
,
is_crowds
]):
indices
=
tf
.
cond
(
tf
.
greater
(
tf
.
size
(
is_crowds
),
0
),
lambda
:
tf
.
where
(
tf
.
logical_not
(
is_crowds
))[:,
0
],
lambda
:
tf
.
cast
(
tf
.
range
(
num_groundtr
t
uhs
),
tf
.
int64
))
lambda
:
tf
.
cast
(
tf
.
range
(
num_groundtru
t
hs
),
tf
.
int64
))
classes
=
tf
.
gather
(
classes
,
indices
)
boxes
=
tf
.
gather
(
boxes
,
indices
)
if
self
.
_include_mask
:
...
...
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