Zhenye-Na / machine-learning-uiuc

🖥️ CS446: Machine Learning in Spring 2018, University of Illinois at Urbana-Champaign
https://courses.engr.illinois.edu/cs446/sp2018/_site/index.html
270 stars 113 forks source link

Performance issue in the definition of fit, assignments/assignment3/mp3/codefromtf/logistic_model.py #2

Open DLPerf opened 3 years ago

DLPerf commented 3 years ago

Hello, I found that in the definition of fit, assignments/assignment3/mp3/codefromtf/logistic_model.py, tf.matmul will be repeatedly added to the graph, resulting in a decrease in the running rate of the program. Therefore, I think node A should be created before the loop to reduce unnecessary overhead.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

Zhenye-Na commented 1 year ago

Please go ahead and make a PR if you still want to contribute.