You got a code to go with that? Could be any number of things, loose connection at any of a dozen points, intermittently bad sensor, solenoid or tranny controller dying. Maybe low fluid, or contamination. Is there anything specific you or the car does right before it happens? Maybe at the same point in a drive with a particular grade?