Lose weight during week gain on weekend

I am perplexed. I lost weight this week but gained it all back plus a half a pound this weekend. Has anyone else had this happen and how to you get out of the rut of this cycle?