Temporarily modify ContrastiveLossLayer class definition so that it builds when CPU_ONLY=true. Will remove when GPU functions are implemented.