Update 'algorithm/optimization/gradient.py'
This commit is contained in:
parent
66e7b7e32f
commit
6f030b73cd
|
@ -150,7 +150,7 @@ class gd2d(object):
|
||||||
|
|
||||||
def initialization_default(self, environ):
|
def initialization_default(self, environ):
|
||||||
pio.renderers.default = environ # 'notebook' or 'colab' or 'jupyterlab'
|
pio.renderers.default = environ # 'notebook' or 'colab' or 'jupyterlab'
|
||||||
self.wg_expr = widgets.Dropdown(options=[("(1 - 8 * x1 + 7 * x1**2 - (7/3) * x1**3 + (1/4) * x1**4) * x2**2 * E**(-x2)", "(1 - 8 * x1 + 7 * x1**2 - (7/3) * x1**3 + (1/4) * x1**4) * x2**2 * E**(-x2)"), ("x1 - x2 + 2*x1*x2 + 2*x1**2 + x2**2", "x1 - x2 + 2*x1*x2 + 2*x1**2 + x2**2"), ("(4-x1)**2 + x2**2", "(4-x1)**2 + 10*x2**2"), ("x1**2 + x2**2", "x1**2 + 10*x2**2")], value="(1 - 8 * x1 + 7 * x1**2 - (7/3) * x1**3 + (1/4) * x1**4) * x2**2 * E**(-x2)", descrption="Expression")
|
self.wg_expr = widgets.Dropdown(options=[("(1 - 8 * x1 + 7 * x1**2 - (7/3) * x1**3 + (1/4) * x1**4) * x2**2 * E**(-x2)", "(1 - 8 * x1 + 7 * x1**2 - (7/3) * x1**3 + (1/4) * x1**4) * x2**2 * E**(-x2)"), ("x1 - x2 + 2*x1*x2 + 2*x1**2 + x2**2", "x1 - x2 + 2*x1*x2 + 2*x1**2 + x2**2"), ("(4-x1)**2 + x2**2", "(4-x1)**2 + x2**2"), ("x1**2 + 10*x2**2", "x1**2 + 10*x2**2")], value="(1 - 8 * x1 + 7 * x1**2 - (7/3) * x1**3 + (1/4) * x1**4) * x2**2 * E**(-x2)", descrption="Expression")
|
||||||
self.wg_x0 = widgets.Text(value="0,2", description="Startpoint:")
|
self.wg_x0 = widgets.Text(value="0,2", description="Startpoint:")
|
||||||
self.wg_lr = widgets.FloatText(value="1e-1", description="step size:")
|
self.wg_lr = widgets.FloatText(value="1e-1", description="step size:")
|
||||||
self.wg_epsilon = widgets.FloatText(value="1e-5", description="criterion:")
|
self.wg_epsilon = widgets.FloatText(value="1e-5", description="criterion:")
|
||||||
|
|
Loading…
Reference in New Issue