neural-networks-and-deep-learning false_minimum.py
来源:互联网 发布:七月算法 邹博退出 编辑:程序博客网 时间:2024/06/06 13:07
局部最优解很多很多
"""false_minimum~~~~~~~~~~~~~Plots a function of two variables with many false minima."""#### Libraries# Third party librariesfrom matplotlib.ticker import LinearLocator# Note that axes3d is not explicitly used in the code, but is needed# to register the 3d plot type correctlyfrom mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as pltimport numpyfig = plt.figure()ax = fig.gca(projection='3d')X = numpy.arange(-5, 5, 0.1)Y = numpy.arange(-5, 5, 0.1)X, Y = numpy.meshgrid(X, Y)Z = numpy.sin(X)*numpy.sin(Y)+0.2*Xcolortuple = ('w', 'b')colors = numpy.empty(X.shape, dtype=str)for x in xrange(len(X)): for y in xrange(len(Y)): colors[x, y] = colortuple[(x + y) % 2]surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors, linewidth=0)ax.set_xlim3d(-5, 5)ax.set_ylim3d(-5, 5)ax.set_zlim3d(-2, 2)ax.w_xaxis.set_major_locator(LinearLocator(3))ax.w_yaxis.set_major_locator(LinearLocator(3))ax.w_zaxis.set_major_locator(LinearLocator(3))plt.show()
0 0
- neural-networks-and-deep-learning false_minimum.py
- neural-networks-and-deep-learning mnist_pca.py
- neural-networks-and-deep-learning expand_mnist.py
- neural-networks-and-deep-learning mnist_average_darkness.py
- neural-networks-and-deep-learning mnist_svm.py
- neural-networks-and-deep-learning network.py
- neural-networks-and-deep-learning network2.py
- neural-networks-and-deep-learning test.py
- neural-networks-and-deep-learning network3.py
- neural-networks-and-deep-learning misleading_gradient.py
- neural-networks-and-deep-learning misleading_gradient_contours.py
- neural-networks-and-deep-learning backprop_magnitude_nabla.py
- neural-networks-and-deep-learning valley.py
- neural-networks-and-deep-learning valley2.py
- neural-networks-and-deep-learning weight_initialization.py
- neural-networks-and-deep-learning multiple_eta.py
- neural-networks-and-deep-learning more_data.py
- Neural Networks and Deep Learning
- Tomcat在生产环境中的性能优化
- OpenWrt无线AP+STA配置
- 换行
- 优化php效率,提高php性能的一些方法
- HDU 1059 Dividing
- neural-networks-and-deep-learning false_minimum.py
- 剑指offer——左旋转字符串
- nodejs代码封装基础
- ROS学习之带有用户自定义参数的回调函数
- Java-HashMap详解
- POJ2366
- python文件转换为exe可执行文件的方法
- Linux-tail命令使用方法演示例子
- 在MAC下配置mysql 5.6.31 及以上的 数据库的默认编码问题