-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
32 lines (28 loc) · 890 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import torch
import torch.nn as nn
class ReglipConfiguration:
def __init__(
self,
hidden_size=768,
intermediate_size=3072,
num_hidden_layer=12,
num_attention_heads=12,
num_channels=3,
image_size=224,
patch_size=16,
layer_norm_eps=1e-6,
attention_dropout=0.0,
num_image_tokens: int = None,
**kwargs
):
super().__init__()
self.hidden_size = hidden_size
self.intermediate_size = intermediate_size
self.num_hidden_layer = num_hidden_layer
self.num_atttention_heads = num_attention_heads
self.num_channels = num_channels
self.image_size = image_size
self.patch_size = patch_size
self.layer_norm_eps = layer_norm_eps
self.attentio_dropout = attention_dropout
self.num_image_tokens = num_image_tokens