use spam / not spam labels

This commit is contained in:
rasbt 2024-05-11 13:42:18 -05:00
parent 45f6e72f40
commit 4b4e1e1ad5
No known key found for this signature in database
GPG Key ID: 3C6E5C7C075611DB

View File

@ -2184,7 +2184,7 @@
" predicted_label = torch.argmax(logits, dim=-1).item()\n",
"\n",
" # Return the classified result\n",
" return \"Positive\" if predicted_label == 1 else \"Negative\""
" return \"spam\" if predicted_label == 1 else \"not spam\""
]
},
{
@ -2211,7 +2211,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Positive\n"
"spam\n"
]
}
],
@ -2242,7 +2242,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Negative\n"
"not spam\n"
]
}
],
@ -2347,7 +2347,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.4"
}
},
"nbformat": 4,