This answer is slightly meta, but please indulge me. Let me take us all back to school and remind everyone of the fundamentals of...
The zombie genre
Zombies, particularly the kind you describe, are literary metaphors for utter hopelessness, or perhaps even death itself, and they usually hold the "you can't defeat them" trump card by design. They keep coming back, by some way - even after a nuclear attack, their gasses would get back into the water supply and re-infect survivors. Zombies are typically slow but relentless - giving you lots of time to think of things to try to improve your situation. You may gain ground but only temporarily (e.g. shooting one knocks it over, and give you a moment to run away, but it eventually gets back up). Many things seem effective but ultimately are not. We are intentionally given an illusion of hope.
Having said that, zombie fiction explores what we as humans do when faced with an inevitably hopeless situation. It explores facets of the human psyche.
Literary works in the genre love to explore all the things we might try:
- Making a last stand - with force. Board up the windows, gather food and ammo and give it our best "Alamo" effort.
- Run. Perpetual fleeing, finding that next car with a little bit of gas to get to the next town, or an airplane that takes us to an even more remote island.
- Seek out loved ones. Making sure we are are in the company of our loved ones when we face our ultimate demise is a human instinct that runs very deep, and spans many cultures.
- Get a bigger gun. Calling in the army, dropping the nuke or whatever it is, just means that if we kick and scream hard enough, maybe we can win the unwinnable fight with force.
- Carry on / go down with the ship. Some people just go about their typical lives, keep going to work and doing your job - sort of ignoring the problem. Keep playing the music even though the Titanic is sinking sort of thing. Ultimately the zombies will come, but we may just choose to accept our fate and let it come when it comes.
- Outsmart it. This is kind of like making a last stand, but with strategy instead of force. We are eternally resourceful, and we attempt to keep our doom at arms length in a variety of innovative ways. We confuse, disguise, defer, delay and Wile E. Coyote our final days away until we slip up.
- Fix the problem. We may seek to "cure" the zombies ultimately. To be true to the genre, outcomes are never good, the cure has limited effectiveness in some way.
- Give up. The fear of an unfitting demise "not like this" may force us to choose to "go out" on our own terms (e.g. suicide of some sort)
- the variant of "Changing teams", becoming a zombie ourselves, is a lot like giving up - but typically this just reinforces that this is a losing move by contrasting zombie life with human life to remind us that we really do lose something precious in defeat. "My mom/wife/teacher is a zombie" is really more of a monster movie trope and explores humanity of being different and it not part of the zombie genre.
Ultimately zombies represent our own mortality. We will all eventually die, but what shall we do with our time before our end? This is the zombie genre. It explores the human condition by shining bright stage lights onto the gruesome fear of death and its gradual but relentless pursuit of us. We study these stories closely to find our own way of justifying our own mortal existence.
. . .
So, having said all that, your military should be ultimately ineffective against zombies - by design of the genre. You, yourself, did not specify a mechanism by which the zombies could be defeated -- and rightfully so!
You are free to explore this dilemma of hopelessness in your own way as so many others have done before you. You're playing the military card, that's fine, all manner of attempts to push back the darkness must be made, including small arms fire. You don't have to be supremely clever to be successful. Whatever you come up with is fine. It's important to ask "what if...", and your answers may very well better our actual society or inspire future zombie stories. But I'll leave it to the other answers here to litter the landscape with more futile attempts to delay inevitable doom dressed in military uniforms.
But beware of the meta-opponent you face today: the zombie genre itself. You may get satisfying answers to your question, finding out a really clever military strategy to contend with the zombies, but the genre itself demands that after formulating any strategy to deal with zombies we always return to ask its most powerful question again, "but what if even that didn't work?"
If you betray the genre by providing an actual way out of the zombie apocalypse, then you are likely just an action story - not a zombie story. Zombies are not a Kobayashi Maru test for humanity. The point isn't to think outside the box and find a solution. The point is to spend time thinking about how you will play the game when it is certain you are going to lose. As each of us must do by choosing how we will live our mortal lives.