King Of Tokyo taking control of Tokyo
The dice are not resolved until after the third and final roll. So obviously you can reroll anything you don't want. Once the final roll is complete, the effects take place. If that includes an attack die, you must go to Tokyo. Likewise in mid-game play, if you have an attack die in your final roll, your opponent will be attacked and can yield Tokyo (their choice) but if this happens, the attacker has no choice and must occupy Tokyo. 
At the beginning when no one is in Tokyo,  if you roll and keep multiple attack dice, the first one doesn't count, but the remainder do.