1. tensor索引
[:, 0:3 , ] 代表从0行开始,一共3-0行
b = torch.arange(16,dtype=float).reshape(1, 4, 4) print(b) print(b[ :, 0:1, ])
标签:tensor,16,reshape,代码,学习,自测,print From: https://www.cnblogs.com/yyhappy/p/17367899.html
1. tensor索引
[:, 0:3 , ] 代表从0行开始,一共3-0行
b = torch.arange(16,dtype=float).reshape(1, 4, 4) print(b) print(b[ :, 0:1, ])
标签:tensor,16,reshape,代码,学习,自测,print From: https://www.cnblogs.com/yyhappy/p/17367899.html