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
d329ea4c
Commit
d329ea4c
authored
Jul 09, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 320506159
parent
1d48e57f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/modeling/hyperparams/base_config.py
official/modeling/hyperparams/base_config.py
+2
-2
No files found.
official/modeling/hyperparams/base_config.py
View file @
d329ea4c
...
@@ -126,10 +126,10 @@ class Config(params_dict.ParamsDict):
...
@@ -126,10 +126,10 @@ class Config(params_dict.ParamsDict):
subconfig_type
=
Config
subconfig_type
=
Config
if
k
in
cls
.
__annotations__
:
if
k
in
cls
.
__annotations__
:
# Directly Config subtype.
# Directly Config subtype.
type_annotation
=
cls
.
__annotations__
[
k
]
type_annotation
=
cls
.
__annotations__
[
k
]
# pytype: disable=invalid-annotation
if
(
isinstance
(
type_annotation
,
type
)
and
if
(
isinstance
(
type_annotation
,
type
)
and
issubclass
(
type_annotation
,
Config
)):
issubclass
(
type_annotation
,
Config
)):
subconfig_type
=
cls
.
__annotations__
[
k
]
subconfig_type
=
cls
.
__annotations__
[
k
]
# pytype: disable=invalid-annotation
else
:
else
:
# Check if the field is a sequence of subtypes.
# Check if the field is a sequence of subtypes.
field_type
=
getattr
(
type_annotation
,
'__origin__'
,
type
(
None
))
field_type
=
getattr
(
type_annotation
,
'__origin__'
,
type
(
None
))
...
...
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