show how to use the finetuned model

This commit is contained in:
Sebastian Raschka
2024-07-09 06:43:26 -07:00
parent e2918af036
commit 4f0a107692
4 changed files with 256 additions and 4 deletions

View File

@@ -2326,7 +2326,7 @@
}
],
"source": [
"model_state_dict = torch.load(\"review_classifier.pth\")\n",
"model_state_dict = torch.load(\"review_classifier.pth\", map_location=device)\n",
"model.load_state_dict(model_state_dict)"
]
},
@@ -2372,7 +2372,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.2"
}
},
"nbformat": 4,