From what I have seen during my time at LPU, you can change branches mid-course by following a specific process. Moving from one branch to another depends on many factors. While it is not recommended that a year will be wasted, you can change branches from mechanical to CSE in the second year or between semesters.
You have to visit the Division of Academic Affairs which is situated in the basement of Block 32 and request for the branch change. LPU also announces the branch change facility on the University Management System (UMS).
For branch change, you have to follow some steps and will also be required to pay a certain amount. The charge is usually lower if you switch during the admission process and slightly higher during the course.