Hi Chriseven!



 flipflop:

since we output tensor with [value1.value2] , which is the prob of binary class , how do we know which value is representing 0 and which value representing 1.


The output of your model, [value1, value2], means whatever you
trained your model for it to mean.
As I understand it, you have structured your model as a two-class
multi-class classifier.  (Your model outputs two values, and you use
CrossEntropyLoss.)  Conceptually (although not in implementation)
this is the same as a binary-classification problem.  (One output value,
and BCEWithLogitsLoss.)
The following post answers your question, but in the language of a
binary-classification problem:

  
    
    
    How to interpret the probability of classes in binary classification? nlp
  
  
    Hello Shaun! 

In short, “class ‘1’” means whatever you trained you model for it 
to mean. 
To explain this, let me go back to one of your earlier posts: 

You talk about x_test and y_test (and y_pred).  I assume 
that y_test is a vector of length the number of test samples, 
with each value in y_test being the number 0, meaning that 
this sample is in class “0”, or the number 1, meaning class “1”. 
(And x_test is the input data whose classes you are trying 
to predict.) 
You don’t mention it, b…
  


Best.
K. Frank