Training of photonic reservoir computing systems