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
ff110c3b
Commit
ff110c3b
authored
Aug 23, 2022
by
Ellery Wulczyn
Committed by
A. Unique TensorFlower
Aug 23, 2022
Browse files
Internal change
PiperOrigin-RevId: 469579875
parent
9661bd57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
official/projects/vit/modeling/vit.py
official/projects/vit/modeling/vit.py
+6
-3
No files found.
official/projects/vit/modeling/vit.py
View file @
ff110c3b
...
...
@@ -228,7 +228,8 @@ class Encoder(tf.keras.layers.Layer):
return
x
def
get_config
(
self
):
config
=
{
config
=
super
().
get_config
()
updates
=
{
'num_layers'
:
self
.
_num_layers
,
'mlp_dim'
:
self
.
_mlp_dim
,
'num_heads'
:
self
.
_num_heads
,
...
...
@@ -239,9 +240,11 @@ class Encoder(tf.keras.layers.Layer):
'init_stochastic_depth_rate'
:
self
.
_init_stochastic_depth_rate
,
'kernel_initializer'
:
self
.
_kernel_initializer
,
'add_pos_embed'
:
self
.
_add_pos_embed
,
'pos_embed_origin_shape'
:
self
.
_pos_embed_origin_shape
,
'pos_embed_target_shape'
:
self
.
_pos_embed_target_shape
,
}
base_
config
=
super
().
get_config
(
)
return
base_
config
.
update
(
config
)
config
.
update
(
updates
)
return
config
class
VisionTransformer
(
tf
.
keras
.
Model
):
...
...
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