I am building my loss function. However, when printing the value of the y_true tensor it is printing values with decimal points (i.e 0.25,0.569,0.958). This should not be true as the y_true should only have two classes 0 or 1. Here is my code:
@tf.function
def weighted_binary_crossentropy(y_true, y_pred):
y_true= K.reshape(y_true, (K.shape(y_true)[0], -1))
tf.print("tensors1:", y_true, output_stream=sys.stdout, summarize=50000)
Any reason why I am getting such an output instead of 0 and 1?