thank you for your reply, i tried write and there is no error , but i am not sure whether is right or not.
class StopatLossValue:
    def on_epoch_end(self, train_losses, **kwargs):
        # if the monitored metrics got worst set a flag to stop training
         eo = 0.1
         if train_losses < eo.pow(2):
             return{'stop_training': True}

and called it in my model
  StopatLossValue()