Electron spin resonance of Dy and Er in Ir