Dog training could go smoothly for a while and then you just have "one of those days." Your dog is not paying attention to you and you feel frustrated. Yelling, jumping and just plain throwing temper tantrums is not the way to garner your dog's attention, especially since you were probably not using a calm voice. Your dog will just close himself off. When these things happen, there are a few things you should always remember about your dog. They may seem simple and elementary, but in the heat of the moment, they are things you should well remember.
1. Your dog is not a mind reader.
Just like you cannot figure out what your dog is thinking, he cannot understand what you are thinking, much less what you want from him. Usually, the downfall of most owners is that they try to attribute human-like qualities onto their pooch and that is simply not going to work. First of all, your dog is all canine. They have certain responses and behaviors that are genetically ingrained into them because they are dogs. Your pet cannot change that. You have to be the one to adapt to him.
2. Your dog only knows the tone of your voice.
Talking to your dog is great. However, you know what you are saying but your dog does not. He just responds by the tone of your voice. If it is soft and loving, it soothes them. If it is upbeat and happy, then they are playful. If your tone of voice is harsh and mean, they get scared or sad or both. So those times when your dog does something wrong and you ask it "What were you thinking? No! No! No!" Your dog was not thinking ... at least not in human terms. It was probably just doing something that dogs do that you didn't approve of, like sniffing and strewing garbage all over the place. Your dog is not going to understand the word no. He will only understand that your voice was mean and scary.
3. Speak your dog's language.
Don't take your dog's growling or other vocalizations personally. They have to communicate somehow. So the next time your dog barks at you, bark right back, especially if that bark was for something he should not be doing. See what he does. Growling works with the same principle. Sometimes, the barking and growling is your dog's way of trying to take over the "alpha" position in the relationship. By barking or growling right back, you are re-asserting your dominance as leader.
4. Follow your dog's lead.
Dogs have certain instincts ingrained in them. It's a part of Mother Nature. What this means is that if you have an Australian Shepherd that has strong herding tendencies, don't try to break him of it. Try and channel it into useful ways. You will certainly fail if you are fighting against your dog's genetic history. The same principle applies to other breeds. If you have a dog breed that is known for its hunting skills, you should know by now that it likely will not like being cooped up in one area. Train it to be sociable and adept in public places. Train him to play fetch and other games that would utilize its hunting instincts.