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
b9bd2f11
Unverified
Commit
b9bd2f11
authored
Mar 30, 2022
by
srihari-humbarwadi
Browse files
fixed dtype bug in `resize_and_rescale_offsets`
parent
cb7e2650
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
official/vision/beta/projects/panoptic_maskrcnn/ops/mask_ops.py
...al/vision/beta/projects/panoptic_maskrcnn/ops/mask_ops.py
+5
-4
No files found.
official/vision/beta/projects/panoptic_maskrcnn/ops/mask_ops.py
View file @
b9bd2f11
...
@@ -35,11 +35,12 @@ def resize_and_rescale_offsets(input_tensor: tf.Tensor, target_size):
...
@@ -35,11 +35,12 @@ def resize_and_rescale_offsets(input_tensor: tf.Tensor, target_size):
"""
"""
input_size_y
=
tf
.
shape
(
input_tensor
)[
1
]
input_size_y
=
tf
.
shape
(
input_tensor
)[
1
]
input_size_x
=
tf
.
shape
(
input_tensor
)[
2
]
input_size_x
=
tf
.
shape
(
input_tensor
)[
2
]
dtype
=
input_tensor
.
dtype
scale_y
=
tf
.
cast
(
target_size
[
0
]
-
1
,
tf
.
float32
)
/
tf
.
cast
(
scale_y
=
tf
.
cast
(
target_size
[
0
]
-
1
,
dtype
=
dtype
)
/
tf
.
cast
(
input_size_y
-
1
,
tf
.
float32
)
input_size_y
-
1
,
dtype
=
dtype
)
scale_x
=
tf
.
cast
(
target_size
[
1
]
-
1
,
tf
.
float32
)
/
tf
.
cast
(
scale_x
=
tf
.
cast
(
target_size
[
1
]
-
1
,
dtype
=
dtype
)
/
tf
.
cast
(
input_size_x
-
1
,
tf
.
float32
)
input_size_x
-
1
,
dtype
=
dtype
)
target_y
,
target_x
=
tf
.
split
(
target_y
,
target_x
=
tf
.
split
(
value
=
input_tensor
,
num_or_size_splits
=
2
,
axis
=
3
)
value
=
input_tensor
,
num_or_size_splits
=
2
,
axis
=
3
)
...
...
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