© 1999-2048 dssz.net 粤ICP备11031372号
[其它] python实现梯度法 python最速下降法
说明:假设我们已经知道梯度法——最速下降法的原理。 现给出一个算例: 如果人工直接求解: 现给出Python求解过程: import numpy as np from sympy import * import math import matplotlib.pyplot as plt import mpl_toolkits.axisartist as axisartist # 定义符号 x1, x2, t = symbols('x1, x2, t') def func(): # 自定义一个函<weixin_38605188> 上传 | 大小:117kb