Test code in pytorch 2.4 (#285)

* test code in pytorch 2.4

* update
This commit is contained in:
Sebastian Raschka
2024-07-24 21:53:41 -05:00
committed by GitHub
parent 6cbe6520a2
commit 08040f024c
17 changed files with 509 additions and 377 deletions

File diff suppressed because one or more lines are too long

View File

@@ -46,8 +46,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"tiktoken version: 0.6.0\n",
"torch version: 2.2.2\n"
"tiktoken version: 0.7.0\n",
"torch version: 2.4.0\n"
]
}
],
@@ -127,7 +127,7 @@
"\n",
"# Then load pretrained weights\n",
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
"model.load_state_dict(torch.load(\"review_classifier.pth\", map_location=device))\n",
"model.load_state_dict(torch.load(\"review_classifier.pth\", map_location=device, weights_only=True))\n",
"model.eval();"
]
},
@@ -241,7 +241,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.11.4"
}
},
"nbformat": 4,