parent
08746b427e
commit
1cf5630742
@ -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()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user