Doesn't respond to gas pedal on 2007 Pontiac Vibe

Last week at a red light my car started running very rough for about a minute. Acted like my previous car when the fuel injectors needed cleaning, which I assumed I was going to have to do. Yesterday it did it again at another red light, but didn't go away when I proceeded to accelerate. Instead, as I was accelerating, it acted like it wasn't getting fuel and my rpms would drop almost to zero, and I would be slowing down/coasting even theought he gas pedal was still depressed. Then it would accelerate again, then lose it again. This went on for about 2 miles, then everything was fine for remaining 10 miles home. It was fine today during a short grocery run. Is this a fuel system problem rather than just dirty injectors? If the problem doesn't repeat when I take it in to be looked at, will they be able to diagnose it? Do I wait until it does it more often, or get it in asap? Thanks alot for your help.

Asked by for the 2007 Pontiac Vibe