我是靠谱客的博主 微笑大碗,这篇文章主要介绍python神经网络绘loss高级曲线图代码,现在分享给大家,希望可以做个参考。

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def 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
7
def cal_Z(C, L): # C,L 转为 SE # SE计算对应的iou S,E = CL2XY(C,L) DIoU = cal_diou(S,E) return 1-DIoU
复制代码
1
2
3
4
5
6
c = 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高级曲线图代码内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部