绘图过程中对tensor类型变量的操纵
import numpy as npimport plotly.graph_objects as goimport pandas as pdimport torchdef Rosenbrock(x): f = ((x[1] - x[0] ** 2) ** 2) * 100 + (1 - x[0]) ** 2 return fx = np.arange(-2, 2, 0.05)y = np.arange(-1, 3, 0.05)X, Y = np.meshgrid(x,