"docs/git@developer.sourcefind.cn:OpenDAS/torch-scatter.git" did not exist on "d536e0d3f6fddfe004b930f72968f8fcf5b400e0"
Commit 62c74392 authored by Liangzhe Yuan's avatar Liangzhe Yuan Committed by A. Unique TensorFlower
Browse files

Register ViT architecture hyperparams.

PiperOrigin-RevId: 461964298
parent 0f0eeb8c
...@@ -263,6 +263,12 @@ class VisionTransformer(tf.keras.Model): ...@@ -263,6 +263,12 @@ class VisionTransformer(tf.keras.Model):
original_init: bool = True, original_init: bool = True,
pos_embed_shape: Optional[Tuple[int, int]] = None): pos_embed_shape: Optional[Tuple[int, int]] = None):
"""VisionTransformer initialization function.""" """VisionTransformer initialization function."""
self._mlp_dim = mlp_dim
self._num_heads = num_heads
self._num_layers = num_layers
self._hidden_size = hidden_size
self._patch_size = patch_size
inputs = tf.keras.Input(shape=input_specs.shape[1:]) inputs = tf.keras.Input(shape=input_specs.shape[1:])
x = layers.Conv2D( x = layers.Conv2D(
......
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