Pytorch CrossEntropyLoss Tensorflow Equivalent
I am currently translating a pytorch code into tensorflow.
There is a point that i am aggregating 3 losses in a tensorflow custom loop and i get an error that i am passing a two dimensional array vs a 1 dimensional into CategoricalCrossEntropy of tensorflow which is very legit and i understand why this happens... but in the pytorch code i am passing the same shapes and it's perfectly working with CrossEntropyLoss. Does anybody know what i have to do to transfer this into TF?
the shapes that are passing in are (17000,100) vs (17000)

Try using the loss loss=tf.keras.losses.sparse_categorical_crossentropy
