ArxAlfa
commited on
Commit
•
8ceaff8
1
Parent(s):
7b1ff82
Update model hyperparameters and number of epochs
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ class DNN(nn.Module):
|
|
32 |
|
33 |
|
34 |
# Load the model
|
35 |
-
model = DNN(input_size=7, hidden_size=
|
36 |
|
37 |
# Initialize the OneHotEncoder
|
38 |
encoder = OneHotEncoder(handle_unknown="ignore")
|
@@ -94,10 +94,10 @@ async def train(file: UploadFile = File(...)):
|
|
94 |
optimizer = optim.Adam(model.parameters(), lr=0.0001)
|
95 |
|
96 |
# Fit the model
|
97 |
-
kf = KFold(n_splits=
|
98 |
accuracies = []
|
99 |
|
100 |
-
epochs =
|
101 |
|
102 |
for epoch in range(epochs):
|
103 |
for train_index, test_index in kf.split(X):
|
|
|
32 |
|
33 |
|
34 |
# Load the model
|
35 |
+
model = DNN(input_size=7, hidden_size=128, output_size=1)
|
36 |
|
37 |
# Initialize the OneHotEncoder
|
38 |
encoder = OneHotEncoder(handle_unknown="ignore")
|
|
|
94 |
optimizer = optim.Adam(model.parameters(), lr=0.0001)
|
95 |
|
96 |
# Fit the model
|
97 |
+
kf = KFold(n_splits=4)
|
98 |
accuracies = []
|
99 |
|
100 |
+
epochs = 25 # Define the number of epochs
|
101 |
|
102 |
for epoch in range(epochs):
|
103 |
for train_index, test_index in kf.split(X):
|