ArxAlfa commited on
Commit
ca246fc
·
1 Parent(s): a0dbd90

Update model hyperparameters and optimizer

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ class DNN(nn.Module):
28
 
29
 
30
  # Load the model
31
- model = DNN(input_size=7, hidden_size=64, output_size=1)
32
 
33
  # Initialize the OneHotEncoder
34
  encoder = OneHotEncoder(handle_unknown="ignore")
@@ -87,10 +87,10 @@ async def train(file: UploadFile = File(...)):
87
 
88
  # Define loss function and optimizer
89
  criterion = nn.MSELoss()
90
- optimizer = optim.Adam(model.parameters(), lr=0.001)
91
 
92
  # Fit the model
93
- kf = KFold(n_splits=4)
94
  accuracies = []
95
 
96
  for train_index, test_index in kf.split(X):
 
28
 
29
 
30
  # Load the model
31
+ model = DNN(input_size=7, hidden_size=128, output_size=1)
32
 
33
  # Initialize the OneHotEncoder
34
  encoder = OneHotEncoder(handle_unknown="ignore")
 
87
 
88
  # Define loss function and optimizer
89
  criterion = nn.MSELoss()
90
+ optimizer = optim.Adam(model.parameters(), lr=0.0001)
91
 
92
  # Fit the model
93
+ kf = KFold(n_splits=10)
94
  accuracies = []
95
 
96
  for train_index, test_index in kf.split(X):