Max_loss_filter