复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15def draw_loss(X,Y,Z): fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # X, Y, Z = axes3d.get_test_data(0.05)#### # Grab some test data. surf = ax.plot_surface(X, Y, Z, cmap=cm.coolwarm, linewidth=0, antialiased=False) # Customize the z axis. #ax.set_zlim(-1.01, 1.01) ax.zaxis.set_major_locator(LinearLocator(10)) ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f')) # Add a color bar which maps values to colors. fig.colorbar(surf, shrink=0.5, aspect=5) plt.show()
复制代码
1
2
3
4
5
6
7def cal_Z(C, L): # C,L 转为 S,E # SE计算对应的iou S,E = CL2XY(C,L) DIoU = cal_diou(S,E) return 1-DIoU
复制代码
1
2
3
4
5
6c = np.arange(0.0, 1.0, 0.02) l = np.arange(0.0, 1.0, 0.02) C,L = np.meshgrid(c,l) Z = cal_Z(C,L) draw_loss(C,L,Z)
最后
以上就是微笑大碗最近收集整理的关于python神经网络绘loss高级曲线图代码的全部内容,更多相关python神经网络绘loss高级曲线图代码内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复