Hi, sounds like your dog is heading into puberty

The first few months are usually a breeze, but now comes the hard part.
Keep your trainingsessions short and fun. Use something he likes very, very much as a reward. His hormones are having a party and it will often seem as if he has forgotten what the simplest commands are. Very normal for a dog at his age. Hang in there, maybe take a step back in training. Be consistent and patient(very, very hard

)
I used lots of play in my training(still do, by the way) when my pup was that age. She loves the ball and tug games. So I used that as a reward. For instance: training a sit-stay. Give the command, wait untill she did it a few seconds, then take out the ball and throw it yippie, party!!!!
It did wonders for me.
If I couldn't get my dogs attention or if she ignored me, I stopped training and just ignored her. Then try again a few minutes later or even later that day.
Good luck!!