In the "Just about every question deserves an answer" department: Training the posterior (rear) muscle chain can improve posture quite well. That would be traps, back (including rear delts) and lower back. Add to this rib box/chest pullovers to the mix. Either straight or the bent arm version. Even ab work. Actually heavy DL's (and SLDL's) would be a very favorable exercise for the posture/round shoulders problem, as it strengthens the muscles in question very strongly. Why you slouch after a set is puzzling.
Some BP specialist (guy's who only do benches..with the usual light arm/lateral raises thrown in) can have the slouched forward look. Their backs are usually flat and void of any noticeable muscle . Too much development front and not balanced by equally developed back muscles can cause this. See guys like that walking around malls all the time. With the flaired out lat spread added to impress lesser mortals.
Might suggest shrugs (very the grip from extra wide to close from time to time....gives a different feel/development to the movement) along with wider grip rows (BB/DBs..elbows way out). Followed by heavy pullovers. The bent arm version seems to affect the stretch on my rig box better than straight. Make your own choice. Higher rep squats can affect the rib box (and posture) also by the inducement of deep and heavy lung power.Which, in some cases, can help lift the rib box due to the influence on the muscle attachments. Doing a lighter set of pullovers right after the squats can help even more.
Try getting in the habit of standing straight, holding the chest out and sucking in the ab muscles a bit. Seems to help with the posture thing. (really sounds like I'm talking to a little kid with all this) Good Luck.