No, as choosing IIT Gandhinagar CSE over electrical in IIT Kanpur is a good choice.
My answer is based on the assumption that you are specifically inclined toward CS. One has to be very careful while filling your branch choices because it will shape your career.
But it’s very necessary to be confident with the choice you have made. Assure yourself that no matter which field you will go to, you will excel at it. Doubting yourself will only hinder your growth. No choice is right or wrong, it all is a matter of preference. One choice might be right for someone while the same choice might be wrong for you. Whether or not you will regret choosing IIT Gandhinagar CSE over IIT Kanpur Electrical depends on your personal interest so make sure you have analyzed that part well.