Questions tagged [sparsecategoricalcrossentropy]
4 questions
0
votes
1 answer
Categorical Crossentropy for probailities distributions
I'm currently attempting to create a model that outputs a probability distribution for a discrete numeric dataset.
I know that categorical cross-entropy as a classification loss function, but if I bucket my numeric data and one-hot encode it could I…

jasper koliba
- 11
- 3
0
votes
1 answer
Regression with numerical labels Y={1,2,3} VS Classification with labels Y={[1 0 0],[0 1 0],[0 0 1]}?
Assume a deep learning problem, where there exists only one object in the image, we want to classify whether the object is either
Y={Cat:1, Dog:2, Panda:3}
Can we address this problem using neural networks in two ways:
Regression Approach:…

Abdallah Ahmed
- 47
- 4
0
votes
1 answer
Logits and labels must have the same first dimension error, despite using sparse catogorical entropy for sparse targets
These are the shapes of my features and target variables.
(1382, 1785, 2) (1382, 2)
The target here has two labels and each label has the same 28 classes. I have a CNN network as follows:-
model.add(Conv1D(100,5, activation='relu',…

Sharan Kumar
- 139
- 1
- 2
- 13
0
votes
0 answers
Label shapes for model output shape (batch_size,1,1,n_classes) and SparseCategoricalCrossEntropy Loss
I'm using tensorflow/keras to build an image classification model. The labels are provided as integers, & so I'm using tf.keras.losses.SparseCategoricalCrossEntropy as documented at…

user3731622
- 4,844
- 8
- 45
- 84