outputs and true_value must be same batch_size.
[[0.4820, 0.5180]]'s shape is [1,2](batch_size,num_labels), and true_value’s shape is [2](num_labels).
therefore you must change true_value’s shape to [1,2](batch_size,num_labels)!