use torch.softmax instead of F.softmax

This commit is contained in:
rasbt
2024-01-28 12:25:49 -06:00
parent eb142491b2
commit 22442b7012

View File

@@ -700,7 +700,7 @@
],
"source": [
"with torch.no_grad():\n",
" out = F.softmax(model(X), dim=1)\n",
" out = torch.softmax(model(X), dim=1)\n",
"print(out)"
]
},
@@ -986,7 +986,7 @@
],
"source": [
"torch.set_printoptions(sci_mode=False)\n",
"probas = F.softmax(outputs, dim=1)\n",
"probas = torch.softmax(outputs, dim=1)\n",
"print(probas)\n",
"\n",
"predictions = torch.argmax(outputs, dim=1)\n",