Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions extras/exercises/01_pytorch_workflow_exercises.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {
"id": "Glu2fM4dkNlx"
},
Expand All @@ -42,7 +42,7 @@
"'2.3.0+cu118'"
]
},
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -59,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {
"id": "LqKhXY26m31s"
},
Expand Down Expand Up @@ -105,7 +105,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {
"id": "KbDG5MV7jhvE"
},
Expand Down Expand Up @@ -145,20 +145,20 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 6,
"metadata": {
"id": "GlwtT1djkmLw"
},
"outputs": [],
"source": [
"# Split the data into training and testing\n",
"from sklearn.model_selection import train_test_split\n",
"X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.20, random_state=42)"
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20, random_state=42)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 7,
"metadata": {
"id": "29iQZFNhlYJ-"
},
Expand Down Expand Up @@ -194,7 +194,7 @@
"\n",
" if predictions is not None:\n",
" # Plot the predictions in red (predictions were made on the test data)\n",
" plt.scatter(test_data, predictions, c=\"r\", s=4, label=\"Predictions\")\n",
" plt.scatter(test_data, predictions, c=\"r\", s=4, marker='s', label=\"Predictions\")\n",
"\n",
" # Show the legend\n",
" plt.legend(prop={\"size\": 14});\n",
Expand Down