It’s not out of the question to ask how you did at the end of the interview. But the way you ask is important. You don’t want to say, “So, do you think I’ll get the job”. Instead, you could ask, “Do you mind if I ask if you have any initial observations or comments about the interview we just had?”. Another slightly more aggressive approach would be to ask, “Is there anything about the interview we just had that would cause you concern about my ability to perform this job well?”.