Generally, yes, but remember to think about why your dog is trying to get your attention. If it is because they want to go outside to toilet, or they are (reasonably)! hungry, then you do have to address that. You need to decide whether the attention seeking is appropriate or not i.e. if your dog barks because they want to go outside to toilet (and not in the last 5 minutes). Think about what your dog trying to communicate.
For more articles on Attention Seeking Behaviour in Dogs click here.