toch.max在使用前首先要import torchimport torcha0 = torch.randn(3, 1)print('a0=', a0)b0=torch.max(a0, 1)print('b0=', b0, '\n')a1 = torch.randn(1, 3)print('a1=', a1)b1=torch.max(a1,1)print('b1=', b1 )outputa0= tensor([[-0.5406], [ 0.2674],
网络框架中的代码笔记
2023-10-01
55 点赞
0 评论
83 浏览