I find my masters topic extremely hard what should I do? I'm writing this because I'm in a real trouble and I need to hear from experienced people. 

I'm new here so please excuse me if I get anything wrong. 
I'm doing my masters in Deep Learning and I'm having toughest time ever. 

I have a research paper very similar to what I wish to make, with the codes in Python which is working fine and is giving results. The problem is I can't understand that  code it's beyond my knowledge.

I read books looking at codes but couldn't achieve that level of being able to understand the code or the paper. 

The paper is about Recurrent Nueral Networks and motion prediction. 

Unfortunately I'm not good at Python or Deep Learning and feel like I'm really stuck. 

My supervisor didn't know much about Deep Learning but he approved my proposal. Now I don't know what to do. 
Should I stick to the topic and take courses in Deep Learning like the one in Coursera even if It means to take extensions beyond the deadline? 

Or should I change the topic completely?

I asked my supervisor and he was against changing the topic he suggested to simplify the topic and choose something simpler than Deep Learning like interpolation. He said that submitting a proposal will take time and it's not guaranteed that your new topic will be easier than your current topic.

I tried to find some codes about interpolation motion data to begin with but can't find anything related to my topic.

I'm not lazy at all, I love researching and I have hundreds of codes in my machine but still can't understand the code I have about RNNs.

I contacted the authors of that paper but they weren't cooperative.

I feel like I ran out of energy and very confused.

If you were in the same situation what would you do?
It's a bit hard to bring this all together to give good advice but let me make a few suggestions. 

With regard to the Python code you are looking at, it is possible that it is just terrible code that no one could understand easily. That may not be the case also, but it happens. On the other hand, if it is a sensible program, then it is probably based on some underlying model that doesn't itself depend on the code. If that is the case, you could find that model and understand it first, then attack the code. The paper you have found probably has some bibliographic references that may help you understand everything. 

Furthermore, you could try to find someone locally who is a Python guru and have them look at the code and give you advice about it - perhaps with the model in hand. 

But your advisor seems to be giving good advice. He or she is the one who will need to approve your result in the end, so it is good to take the advice offered. If doing a bit less is acceptable to them, then it is acceptable, and probably easier. Doing a simpler project should also give you more experience and better enable you to take on harder work later. As a Master's level student it may be a mistake to go beyond the understanding of your professor. Doctoral students normally need to do that, but they have a lot more experience by then. 

Running out of energy (burn out) is a serious academic issue. One way to avoid it is to make a plan, in conjunction with your advisor, that you can execute properly. Once you have a plan it won't feel like you are just thrashing around, as long as you follow the plan.