During training, after 1 epoch i get following error
...
File "/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer_experimental/optimizer.py", line 259, in compute_gradients
grads = tape.gradient(loss, var_list)
Node: 'gradient_tape/sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/mul'
required broadcastable shapes
[[{{node gradient_tape/sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/mul}}]] [Op:__inference_train_function_36362]
I am fitting my model during training using my custom dataset in batches,
input and output has the following shapes
img_shape: (24, 64, 160, 3)
label_shape: (24,)
my model has following input
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_2 (InputLayer) [(24, 64, 160, 3)] 0 []
and following output
dense (Dense) (24, 34) 34034 ['tf.compat.v1.squeeze_1[0][0]']
I am using sparse_categorical_crossentropy loss