Hello, CrossEntropyLoss Returns 2 values in tensor. i want these tensors to return 0 or 1 as classes.
But.
for i in range(len(y_test)):
print(y_val[i].argmax().item())
argmax().item() only returns zeros.
How can i retunr zero or 1 out of these tensors?
for i in range(10):
print(y_val[i])tensor([ 4.0784, -4.6333])
tensor([ 3.4433, -3.3892])
tensor([ 2.8473, -2.9989])
tensor([ 1.4762, -1.3092])
tensor([ 4.6216, -5.5956])
tensor([ 2.1936, -1.9820])
tensor([ 2.4091, -1.7561])
tensor([ 4.1027, -3.2408])
tensor([ 2.3697, -2.1431])
tensor([ 2.7150, -2.2833])