EarlyStop layer development

Add all files and since this is not a dev branch, I could not us
REGISTER_LAYER_CLASS macro, so I need to move all code to dev