Create Save_as_json
Browse files- Save_as_json +13 -0
Save_as_json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
|
3 |
+
config = {
|
4 |
+
"model_type": "bert",
|
5 |
+
"hidden_size": 768,
|
6 |
+
"num_attention_heads": 12,
|
7 |
+
"num_hidden_layers": 12,
|
8 |
+
"vocab_size": 30522,
|
9 |
+
"max_position_embeddings": 512
|
10 |
+
}
|
11 |
+
|
12 |
+
with open("config.json", "w") as f:
|
13 |
+
json.dump(config, f)
|