Deep Learning Method Python Code