Is it frowned upon to go to office hours as a graduate student? I'm a graduate student (PhD, first year) in physics, and there have been a few times where I just can't figure out something regarding the material/subject of the class. Normally I just tell myself that since I'm a graduate student, I better be able to figure it out myself without the help of the professor, or any other "higher-ups" in my department for that matter. This usually leads to success, but not without a fair amount of work. Sometimes the end of my problem seems to recede faster than I make progress, and I usually have other stuff to do, so I get really tempted to just ask the professor, specifically by going to their office hours.

My question is, is going to office hours in a graduate course seen as a bad or "inferior" in US grad schools? I'm obviously not talking about spamming the professor with impulsive and ill-conceived questions.

EDIT: Some people in the comments are saying "Well you're a graduate student, and there are office hours, so obviously you can and should make use of them." Life isn't as simply black-and-white as that. The focus of my question is on the unspoken, possibly subliminal, perception of going to office hours as a graduate student which, by its very nature, is not explicitly stated in "official" text (e.g. syllabi, student conduct guidelines, etc.). Such latent social phenomena are present in every situation and culture. Stated explicitly or not, general academic culture expects graduate students to become independent researchers. I was wondering whether this underlying expectation affected the perception of going to office hours as a graduate student, which by definition is a partial dependence on the professor. This topic is nuanced by the various ways in which one could "go to office hours" (e.g. fully prepared, unprepared, in-between, etc.) and by the variation in perceptions of those various ways. Therefore I think it's nontrivial and worth asking about.
Grad students who come to office hours with good questions that show serious engagement with the material (e.g. attempts to solve the problem themself) are generally seen as mature, hard-working students.

It is also a good way to get to know faculty in your department, which can be useful e.g. if you are looking for a research assistantship, or recommendation letters, etc.

Personally, when I teach, I like when students come to office hours with good questions - it helps me see how students are understanding the lesson, where common points of friction are, and thereby improves the quality of my instruction. It also helps them do better in the course, which is of course a goal we have in common. But, I enjoy teaching and engaging with students. Some faculty in my department don't like teaching, and don't like office hours - but even those faculty members don't look down on students who make (good) use of them.