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
44065de2
"examples/vscode:/vscode.git/clone" did not exist on "25f850a23bf7cce15f308b157b237554bbfdc8ed"
Commit
44065de2
authored
Apr 20, 2022
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 443101855
parent
0b5cbdcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
official/projects/vit/modeling/vit.py
official/projects/vit/modeling/vit.py
+4
-2
No files found.
official/projects/vit/modeling/vit.py
View file @
44065de2
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
# limitations under the License.
# limitations under the License.
"""VisionTransformer models."""
"""VisionTransformer models."""
import
immutabledict
import
tensorflow
as
tf
import
tensorflow
as
tf
from
official.modeling
import
activations
from
official.modeling
import
activations
...
@@ -23,7 +25,7 @@ from official.vision.modeling.layers import nn_layers
...
@@ -23,7 +25,7 @@ from official.vision.modeling.layers import nn_layers
layers
=
tf
.
keras
.
layers
layers
=
tf
.
keras
.
layers
VIT_SPECS
=
{
VIT_SPECS
=
immutabledict
.
immutabledict
(
{
'vit-ti16'
:
'vit-ti16'
:
dict
(
dict
(
hidden_size
=
192
,
hidden_size
=
192
,
...
@@ -72,7 +74,7 @@ VIT_SPECS = {
...
@@ -72,7 +74,7 @@ VIT_SPECS = {
patch_size
=
14
,
patch_size
=
14
,
transformer
=
dict
(
mlp_dim
=
8192
,
num_heads
=
16
,
num_layers
=
48
),
transformer
=
dict
(
mlp_dim
=
8192
,
num_heads
=
16
,
num_layers
=
48
),
),
),
}
}
)
class
AddPositionEmbs
(
tf
.
keras
.
layers
.
Layer
):
class
AddPositionEmbs
(
tf
.
keras
.
layers
.
Layer
):
...
...
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