Is it possible to log the each batch sample loss during batch processing and get the loss list in on_batch_end(), as it returns total loss?
something like
[sample id1-loss_val, sample],[sample-id2,loss-val2]......
You can do that using the callbacks by writing your own as given in the documentation.
class LossHistory(keras.callbacks.Callback):
def on_train_begin(self, logs={}):
self.losses = []
def on_batch_end(self, batch, logs={}):
self.losses.append(logs.get('loss'))
@AdityaGudimella It looks like your snippet gives the batch loss, not the sample loss, right?
@gaurav-kjain @AdityaGudimella ping
Any solutions for this problem?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.
I would like to upvote this issue as I (as well as some others) need such information for active learning setup.
Thanks!
Most helpful comment
I would like to upvote this issue as I (as well as some others) need such information for active learning setup.
Thanks!