import optimtool as oo
from optimtool.base import np, sp, plt
pip install optimtool>=2.5.0
加载hybird.nesterov.accer方法
import optimtool.hybrid as oh
nes_acc = oh.nesterov.accer
初始化输入数据
f ( x ) = ∑ i = 1 n ( ( n − ∑ j = 1 n cos x j ) + i ( 1 − cos x i ) − sin x i ) 2 , x 0 = [ 0.2 , 0.2 , . . . , 0.2 ] f(x)=\sum_{i=1}^{n}((n-\sum_{j=1}^{n}\cos x_j)+i(1-\cos x_i)-\sin x_i)^2, x_0=[0.2, 0.2, ...,0.2] f(x)=i=1∑n((n−j=1∑n