Upload 6 files
Browse files- config.json +12 -0
- label_encoder.pkl +3 -0
- model.py +20 -0
- pytorch_model.bin +3 -0
- svd.pkl +3 -0
- vectorizer.pkl +3 -0
config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "simple_classifier",
|
| 3 |
+
"input_dim": 200,
|
| 4 |
+
"num_classes": 3,
|
| 5 |
+
"p_dropout": 0.3,
|
| 6 |
+
"classes": [
|
| 7 |
+
"0",
|
| 8 |
+
"1",
|
| 9 |
+
"2"
|
| 10 |
+
],
|
| 11 |
+
"transformers_version": "4.53.3"
|
| 12 |
+
}
|
label_encoder.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a3dcb20c29e4f03562ede13277978ef1d1a0b802ab36d55b325ef7f6c3d31c5d
|
| 3 |
+
size 265
|
model.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
import torch.nn as nn
|
| 3 |
+
import torch.nn.functional as F
|
| 4 |
+
|
| 5 |
+
class SimpleClassifier(nn.Module):
|
| 6 |
+
def __init__(self, input_dim, num_classes, p_dropout=0.3):
|
| 7 |
+
super().__init__()
|
| 8 |
+
self.linear1 = nn.Linear(input_dim, 256)
|
| 9 |
+
self.ln1 = nn.LayerNorm(256)
|
| 10 |
+
self.dropout = nn.Dropout(p_dropout)
|
| 11 |
+
self.linear2 = nn.Linear(256, 128)
|
| 12 |
+
self.ln2 = nn.LayerNorm(128)
|
| 13 |
+
self.linear_out = nn.Linear(128, num_classes)
|
| 14 |
+
|
| 15 |
+
def forward(self, x):
|
| 16 |
+
x = F.gelu(self.ln1(self.linear1(x)))
|
| 17 |
+
x = self.dropout(x)
|
| 18 |
+
x = F.gelu(self.ln2(self.linear2(x)))
|
| 19 |
+
x = self.dropout(x)
|
| 20 |
+
return self.linear_out(x)
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6288371aa36302552551542f8c8449a8ddb628931d0008b76c33178deec6257
|
| 3 |
+
size 345541
|
svd.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4e8a69972f12e7076a4a93c497e154663dc9c15197d41ade4b59cbc830a967b
|
| 3 |
+
size 5125340
|
vectorizer.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df7dce17f5545d992b62a5c837c60af0855b4d499881f74fe304b6e75c222c12
|
| 3 |
+
size 705778
|