pytorch索引与切片

# indexing ``` a=torch.randn(4,3,28,28) a[0].shape # torch.Size([3, 28, 28]) a[0,0].shape # torch.Size([28, 28]) a[0,0,2,4] # tensor(0.6574) ``` # sel
posted @ 2023-07-30 16:15  哎呦哎(iui)  阅读(12)  评论(0编辑  收藏  举报