Spaces:
Sleeping
Sleeping
Update doors_fasterrcnn.py
Browse files- doors_fasterrcnn.py +1 -1
doors_fasterrcnn.py
CHANGED
|
@@ -176,7 +176,7 @@ def main_run(pdf_fullpath, weights_path, pdf_name):
|
|
| 176 |
# Load the saved model's state dictionary with map_location to handle CPU
|
| 177 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
| 178 |
# model.load_state_dict(torch.load(weights_path, map_location=device))
|
| 179 |
-
model.load_state_dict(torch.load(weights_path, map_location=
|
| 180 |
# Set the model to evaluation mode
|
| 181 |
model.eval()
|
| 182 |
# Move the model to the appropriate device
|
|
|
|
| 176 |
# Load the saved model's state dictionary with map_location to handle CPU
|
| 177 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
| 178 |
# model.load_state_dict(torch.load(weights_path, map_location=device))
|
| 179 |
+
model.load_state_dict(torch.load(weights_path, map_location=device), strict=False)
|
| 180 |
# Set the model to evaluation mode
|
| 181 |
model.eval()
|
| 182 |
# Move the model to the appropriate device
|