First of all, I wanted to thank you for the mentor job and point out that I asked the question about creating the new post or not to simplify the whole process of teaching you and learning us.
Getting back to the problem:
I don’t know if I understood your question well, but this is the way I’m dealing with converting the labels in augmentimages, example:
indices before one hot encoding:
[0, 1]
indices after one hot encoding:
tf.Tensor(
[[1. 0.]
[0. 1.]], shape=(2, 2), dtype=float32)
Currently I’m using softmax because I want “the sum of the probabilities adds up to 1.” I also used the sigmoid just to see if the accuracy could have improved.
I did this (not writing the whole because of the CoC):
tf.reverse(..., ...)
First, I expanded the dimensionality of the image as requested with tf.expand_dims where I added the batch dimension. Then I defined the expected output using the batch dimensionality of the new expanded image. That is, I used tf.one_hot and multiplied [label] by the batch size of the new expanded image, and depth set equal to the number of classes.
Categorical Cross Entropy, since dealing with 2 classes. I also tried the Binary with no improvement. Am I wrong in using them?
Yes, I did it.
Yes (but not every time), because I wanted to see if do_salience() was working as expected.
Thank you again ![]()
Regards,
Luca