Update app.py
Browse files
app.py
CHANGED
@@ -62,16 +62,17 @@ model.load_state_dict(torch.load(model_weights_path))
|
|
62 |
# Set the model to evaluation mode for inference
|
63 |
model.eval()
|
64 |
|
65 |
-
# Create a NeuralNetClassifier using the loaded model
|
66 |
-
cnn = NeuralNetClassifier(
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
)
|
73 |
-
|
74 |
-
cnn.fit(XCnn_train, y_train)
|
|
|
75 |
|
76 |
|
77 |
|
|
|
62 |
# Set the model to evaluation mode for inference
|
63 |
model.eval()
|
64 |
|
65 |
+
# # Create a NeuralNetClassifier using the loaded model
|
66 |
+
# cnn = NeuralNetClassifier(
|
67 |
+
# module=model,
|
68 |
+
# max_epochs=0, # Set max_epochs to 0 to avoid additional training
|
69 |
+
# lr=0.002, # You can set this to the learning rate used during training
|
70 |
+
# optimizer=torch.optim.Adam, # You can set the optimizer used during training
|
71 |
+
# device='cpu' # You can specify the device ('cpu' for CPU, 'cuda' for GPU, etc.)
|
72 |
+
# )
|
73 |
+
|
74 |
+
# cnn.fit(XCnn_train, y_train)
|
75 |
+
cnn = model
|
76 |
|
77 |
|
78 |
|