Gosula commited on
Commit
e941ac3
1 Parent(s): 9285202

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -62,17 +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
- # 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
 
 
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
+
76
 
77
 
78