Not really. CPUs are great for learning basics when you first play the game and for passing time if you don't have access to a real player/don't want to lag/want to play casually, but not for training.
The advantage with CPU training is that since they punish a lot of things, you can learn what is safe and what is not. This way, you can really see what moves work in what situations, and if you keep getting punished by doing a certain move/action against a lvl 9 CPU, there's a good chance a real player will punish you too. Since they're programmed to respond to your actions and punish what they can, they'll likely punish you more than a real player will (but this is not necessarily true, a top player will punish you every time). Keep in mind that they might not choose the best punish option; they might for example do a smash attack when a grab would have been better, so it primarily teaches you what is safe instead of how to react after being punished.
The other good thing is it lets you practice combos on moving targets, so you can combo real players better because you learn to set up your combo starters.
That's about it for the advantages.
The primary problem is that they can't think. They don't learn to adapt to different situations. If you keep punishing one of their moves, they'll keep doing it. You're fighting a robot, literally. As I said, they don't think about the consequences of their actions on the long term, so they don't know how to properly control the stage. They don't know how to combo effectively. These are all things a real player can do, that you won't have a clue how to deal with if you haven't experienced facing it.
Since you have to actually be able to win against them, CPUs are programmed to do mistakes. Like not shielding when they need to, throwing out unsafe attacks, or rolling/approaching when they're not supposed to. Good players don't do it as much, so facing one will seem a lot harder.
Another bad thing about practicing against CPUs is that you get bad habits. For example, since they air dodge a lot of things, it's harder to practice following up with aerials, or baiting air dodges, and you might gain the habit of not doing it. Also, they get out of grabs super fast, so if you play too much against CPUs you might gain the habit of never doing pummels.
All this means you can't practice your technical skills effectively (because they do things a human cannot do, and it limits your gameplay), and you can't practice the psychological side of the game at all, which is probably the most important thing to get good at. If that makes any sense.
I'm sure there are more bad aspects of training with a CPU. Sure, it's not lost training, but you should always remember not to develop bad habits because of it, and keep in mind it's far from optimal training. If you want to simply have fun or practice for casual matches against friends, go for it, but if you're serious about smash and getting better, try not to play too much against them.