No. It is not fine. When you do a job, you will many times have to do jobs that you are hardly interested in. E.g., most of the teachers don't like grading (checking) answer books, but we have to do it and have to do it well (because otherwise the students will breath down your neck).
Similarly, when you are getting a degree, you will not be that interested in many subjects but you have to study them. Many times things have to be done even if you are not interested in them. E.g., going to get vegetables from the market everyday. I am not very interested in it, but I have to do it.
Moreover, if you go with the preconception that I won't like a particular subject because I am interested in computer science, you won't be able to gain anything. Interest in computer science is not "exclusive," meaning that if you are interested in computer science, it does not mean that you cannot be interested in other subjects. Try learning with an open mind and you will become interested in other subjects. Your grades in your B.Tech. are going to count towards your Ph.D. admissions and if your grades are very poor, your chance of Ph.D. admission will take a significant hit.
You will be frustrated in the future if you don't pay attention to your classes now and have to explain your bad grades for the rest of your life. Don't do it. Take out a couple of hours every day for machine learning and spend rest of the time focussing on your other subjects.