Update 06_multicat.ipynb (#349)

Fix binary_cross_entropy
This commit is contained in:
Joe Bender authored and GitHub committed 2020-12-11 13:36:58 -08:00
1 parent 08746b427e
commit 1cf5630742
1 file changed
+1 -1
+1 -1
View File
@@ -976,7 +976,7 @@
"source": [
"def binary_cross_entropy(inputs, targets):\n",
" inputs = inputs.sigmoid()\n",
" return -torch.where(targets==1, inputs, 1-inputs).log().mean()"
" return -torch.where(targets==1, 1-inputs, inputs).log().mean()"
]
},
{