I've been a huge fan of the Capaldi doctor - just recently started rewatching all his episodes and there are certainly some weaker ones as he finds his feet, but that is normal.
I'm not surprised he's leaving. Steven Moffat - the talent behind Press Gang, Jekyll and Sherlock, and whose individual pre-Capaldi-era Dr Who writing credits is a list of brilliant episodes (The Empty Child, The Girl in the Fireplace, Blink, Silence in the Library, Day of the Moon among my favourites, along with many more good quality ones) has been in overall creative control so far for Capaldi's work.
But Moffat is going and is being replaced by Chris Chibnall - whose previous writing credits include really terrible stuff like the utter flop Spooks Code Nine, the derivative and uninspired Camelot and the truly awful Torchwood (Dr Who spinoff) - though also some actually good stuff occasionally. Previous Dr Who writing is a relatively short list characterised mainly by ideas that aren't that well presented and are resolved in ridiculous and/or unsatisfying ways.
I don't hold much hope for the Dr Who of 2018 to be much cop, and I don't blame Capaldi for a moment for extracting himself before that comes. Happily we have 12 episodes and a Christmas special still ahead from the Moffat/Capaldi combo before we have to face that.