Jaavid25 commited on
Commit
7f39b61
·
verified ·
1 Parent(s): e0ec6d3

Upload configuration_apex.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. configuration_apex.py +28 -0
configuration_apex.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import PretrainedConfig
2
+
3
+ class APEXConfig(PretrainedConfig):
4
+ model_type = "apex"
5
+
6
+ def __init__(
7
+ self,
8
+ mert_model_name = "m-a-p/MERT-v1-95M",
9
+ layer_indices = [2, 5, 8, -1],
10
+ segment_sec = 30,
11
+ seed = 42,
12
+ input_dim = 768,
13
+ shared_dims = [512, 256],
14
+ branch_dims = [128, 64],
15
+ dropout_shared = 0.3,
16
+ dropout_branch = 0.1,
17
+ **kwargs
18
+ ):
19
+ super().__init__(**kwargs)
20
+ self.mert_model_name = mert_model_name
21
+ self.layer_indices = layer_indices
22
+ self.segment_sec = segment_sec
23
+ self.seed = seed
24
+ self.input_dim = input_dim
25
+ self.shared_dims = shared_dims
26
+ self.branch_dims = branch_dims
27
+ self.dropout_shared = dropout_shared
28
+ self.dropout_branch = dropout_branch