Dogs tend to yawn in response to an exciting or stressful situation. It is thought that a yawn helps to calm them.
A lovely adult dog yawning whilst lying on the grass
If you notice your dog yawning when you are training him he might be trying to send you a message that he would like a break. If he is yawning before a break he is anticipating something happening and trying to calm himself.