There is no difference in meaning or grammatical or idiomatic validity between “Realizing that X, I …” and “After realizing that X, I …”.
However, there is a lapse in your proposed sentence. “My master” refers to a person. The usage of the word in English is derived from the Latin word “magister,” meaning “chief” or “teacher.” So you may study a master by studying his works, or you may study with or under a master by studying under his or her direction. I greatly doubt that is what you mean by saying that you went to university X to study under some person named Y or to study the thoughts of person Y. I strongly suspect that you mean that you went to study to gain a master’s degree, which indicates a certain level of knowledge.
In other word,
study my master
does not begin to describe why you went to that university. You almost certainly went
to study for my master’s degree