label smoothing as an optionally pre-processing step for model training #52
dbuscombe-usgs
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Seems like we could use: https://www.tensorflow.org/addons/api_docs/python/tfa/image/median_filter2d. this is going to happen to the labels or the model generated predictions? if labels, should we put in if it was going to be the model as a Lambda layer, we can do something like:
and then: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I propose that it would be possible to smooth labels on the fly during model training using a custom training loop or lambda layer in the model. The latter would be preferable
the smoothing would consist of a spatial-domain filter on one-hot encoded matrix slices, which are binary 0s and 1s
for example, a median filter
what does this look like in keras?
model.add(Lambda(lambda x: apply_median_filter(x, kernel_size)))
?
Beta Was this translation helpful? Give feedback.
All reactions