99 honda accord ex 4 cylinder automatic

What is causing my car to stop during accelerating? I putbthe car in gear and it jerk ftom park to reverse to neutral to drive. Takes off smooth and about 5 seconds comes to a stop without me touching the brake and then goes. It continues to do this. Almost like something heavy is pulling it to make it stop thenlets go and then grabs back on again. I had the solenoid gasket replaced because the car was leaking transmission fluid. That was fixed thenas we went on a test drive this happened