"examples/vscode:/vscode.git/clone" did not exist on "25f850a23bf7cce15f308b157b237554bbfdc8ed"
Commit 44065de2 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 443101855
parent 0b5cbdcf
...@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment