Training your dog requires patience and time. It is a very important step in keeping a dog, and not only makes your life together more enjoyable, it also establishes the hierarchy in the family.
It is important to remember that dogs read our faces and feelings much more accurately than an adult human. This means that if you're getting frustrated or pissed off during training, your dog will sense it. When this happens, he or she will come to associate training time with unpleasant emotions and a stressful atmosphere, and this will make them difficult to train.
For this reasons, training your dog by providing an incentive to do well is much more effective than punishing them. If you find yourself trying too hard and getting frustrated, don't try and hide it and continue. You can't hide from a dog. Take a break and relax for a while. Then try again when you're fresh.