tensorflow / ranking

Learning to Rank in TensorFlow
Apache License 2.0
2.74k stars 474 forks source link

Using NumPy APIs to improve performance and the code quality,  #325

Open maldil opened 2 years ago

maldil commented 2 years ago

Thank you very much for your excellent work in tensorflow/ranking.

I am a graduate student at the University of Colorado, studying the best practices of evolving ML codes. From our research, one of the most common evolution best practice in ML code is the migration of loop-based computations, since it improves performance and code quality. We made the following changes in tensorflow/ranking, which remove the FOR loop and use NumPy APIs and List Comp. I carefully checked the modification to ensure that it does not break the code. I will gladly contribute. Please help me to merge this.