All dog’s need exercise, irrespective of what you’re feeding them. Small dogs are usually more active than large dogs and all younger dogs are more active than when they become older (just as in humans). If you have a sufficiently large garden then “out walks” may not be that necessary for exercise per se.
However, it is important that dogs, as with all animals (again including humans) need mental stimulation. Walks are just as important for this as for exercise – dogs need to smell and see and explore and hopefully also interact with other dogs and people to maintain their mental health and equilibrium. The amount of actual exercise depends on the energy levels of your dog and this is determined by the breed, age and health status of the animal. Obviously the higher the energy levels of your friend the more exercise he or she needs.