Basic_CNNs_TensorFlow2
Basic_CNNs_TensorFlow2 copied to clipboard
Assign different gradient weights
trafficstars
How to write the code to assign different gradient weights to different classes of SparseCategoricalCrossentropy
The sample_weight param may work. https://tensorflow.google.cn/api_docs/python/tf/keras/losses/SparseCategoricalCrossentropy#call