ai-venkat-r commited on
Commit
f22eaf8
1 Parent(s): 975257f

Tech: Change Model type in config to enable inference API (#16)

Browse files

- tech: update config to enable inference (57f695327786b639286dbcb4844bfab38d3bb111)

Files changed (1) hide show
  1. config.json +32 -20
config.json CHANGED
@@ -1,23 +1,35 @@
1
  {
2
- "model_type": "lstm",
3
- "base_model": "LSTM",
4
  "library_name": "tensorflow",
5
- "vocab_size": 500,
6
- "embedding_dim": 64,
7
- "hidden_size": 64,
8
- "num_layers": 2,
9
- "dropout_rate": 0.2,
10
- "max_sequence_length": 10,
11
- "batch_size": 8,
12
- "epochs": 50,
13
- "loss_function": "sparse_categorical_crossentropy",
14
- "optimizer": "adam",
15
- "metrics": ["accuracy"],
 
 
 
 
 
 
16
  "train_data_size": 5000,
17
- "categories": [
18
- "Lifestyle",
19
- "Movies & Entertainment",
20
- "Food & Dining",
21
- "Others"
22
- ]
23
- }
 
 
 
 
 
 
 
1
  {
2
+ "model_type": "custom",
3
+ "architectures": ["LSTM"],
4
  "library_name": "tensorflow",
5
+ "task_specific_params": {
6
+ "text-classification": {
7
+ "vocab_size": 500,
8
+ "embedding_dim": 64,
9
+ "hidden_size": 64,
10
+ "num_layers": 2,
11
+ "dropout_rate": 0.2,
12
+ "max_sequence_length": 10
13
+ }
14
+ },
15
+ "training_params": {
16
+ "batch_size": 8,
17
+ "epochs": 50,
18
+ "loss_function": "sparse_categorical_crossentropy",
19
+ "optimizer": "adam",
20
+ "metrics": ["accuracy"]
21
+ },
22
  "train_data_size": 5000,
23
+ "id2label": {
24
+ "0": "Lifestyle",
25
+ "1": "Movies & Entertainment",
26
+ "2": "Food & Dining",
27
+ "3": "Others"
28
+ },
29
+ "label2id": {
30
+ "Lifestyle": 0,
31
+ "Movies & Entertainment": 1,
32
+ "Food & Dining": 2,
33
+ "Others": 3
34
+ }
35
+ }