This code is from tutorials of a friend on Udemy. I know it because I did all the codes presented by Hadelin (we did the Bachelor together, and he buys me the codes for a few euros).
I want to apologise, I am doing a PhD in Portugal, with a Portuguese salary. Selling codes for tutorials doubled my salary so I can regularly take the flight to see my family and friends in France and Switzerland.
But, as I did the code, I can tell you: Don’t trust it! I did it quickly (very quickly) on my free time. This one is from the autoencoder for movie rate prediction, and the results of prediction are very far from the state-of-the-art results presented in the paper http://users.cecs.anu.edu.au/~u5098633/papers/www15.pdf 92.
Also, I would not recommend non-free tutorials: most of the time, there is a ‘bad-spirit’ business hidden behind, they are not made for sharing knowledge but to make huge profits. This one, on Udemy, is a good example. My friend who is presenting the code is not understanding it at all. You have free tutorials with much better quality on the official websites and everywhere on Github.