7-函数最优解优化问题
发布时间
阅读量:
阅读量
一、 函数 表达式

二、函数最优解

三、代码实现与功能验证
import numpy as np
from matplotlib import pyplot as plt
import torch
def himmelblau(x):
return (x[0] ** 2 + x[1] - 11) ** 2 + (x[0] + x[1] ** 2 - 7) *
x = np.arange(-6, 6, 0.1)
y = np.arange(-6, 6, 0.1)
print('x,y range:', x.shape, y.shape)
X, Y = np.meshgrid(x, y)
print('X,Y
全部评论 (0)
还没有任何评论哟~
