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
fb4b9580
"git@developer.sourcefind.cn:OpenDAS/dlib.git" did not exist on "d1b579f09e18b8eea8e0e59bc33266c045cb55b7"
Unverified
Commit
fb4b9580
authored
Oct 24, 2021
by
srihari-humbarwadi
Browse files
add missing `from_config` method
parent
c1b65fc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
official/vision/beta/projects/panoptic_maskrcnn/modeling/layers/paste_masks.py
...projects/panoptic_maskrcnn/modeling/layers/paste_masks.py
+10
-3
No files found.
official/vision/beta/projects/panoptic_maskrcnn/modeling/layers/paste_masks.py
View file @
fb4b9580
...
@@ -29,7 +29,7 @@ class BilinearGridSampler(tf.keras.layers.Layer):
...
@@ -29,7 +29,7 @@ class BilinearGridSampler(tf.keras.layers.Layer):
align_corners: A `bool` bool, if True, the centers of the 4 corner
align_corners: A `bool` bool, if True, the centers of the 4 corner
pixels of the input and output tensors are aligned, preserving the
pixels of the input and output tensors are aligned, preserving the
values at the corner pixels.
values at the corner pixels.
"""
"""
super
(
BilinearGridSampler
,
self
).
__init__
(
**
kwargs
)
super
(
BilinearGridSampler
,
self
).
__init__
(
**
kwargs
)
self
.
align_corners
=
align_corners
self
.
align_corners
=
align_corners
...
@@ -121,13 +121,16 @@ class BilinearGridSampler(tf.keras.layers.Layer):
...
@@ -121,13 +121,16 @@ class BilinearGridSampler(tf.keras.layers.Layer):
def
get_config
(
self
):
def
get_config
(
self
):
return
self
.
_config_dict
return
self
.
_config_dict
@
classmethod
def
from_config
(
cls
,
config
):
return
cls
(
**
config
)
class
PasteMasks
(
tf
.
keras
.
layers
.
Layer
):
class
PasteMasks
(
tf
.
keras
.
layers
.
Layer
):
"""Layer to paste instance masks."""
"""Layer to paste instance masks."""
def
__init__
(
self
,
output_size
:
List
[
int
],
def
__init__
(
self
,
output_size
:
List
[
int
],
grid_sampler
,
**
kwargs
):
grid_sampler
,
**
kwargs
):
"""Generates panoptic segmentation masks.
"""Generates panoptic segmentation masks.
Args:
Args:
...
@@ -169,3 +172,7 @@ class PasteMasks(tf.keras.layers.Layer):
...
@@ -169,3 +172,7 @@ class PasteMasks(tf.keras.layers.Layer):
def
get_config
(
self
):
def
get_config
(
self
):
return
self
.
_config_dict
return
self
.
_config_dict
@
classmethod
def
from_config
(
cls
,
config
):
return
cls
(
**
config
)
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