Added ability to use depth loss