title: How to use Cross Entropy loss in pytorch for binary prediction
body: <p>In the pytorch docs, it says for cross entropy loss:</p>
  
  <blockquote>
    <p>input has to be a Tensor of size (minibatch, C)</p>
  </blockquote>
  
  <p>Does this mean that for binary (0,1) prediction, the input must be converted into an (N,2) tensor where the second dimension is equal to (1-p)?</p>
  
  <p>So for instance if I predict 0.75 for a class with target 1 (true), would I have to stack two values (0.75; 0.25) on top of each other as input?</p>