mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-19 09:24:46 +08:00
15 lines
346 B
Python
15 lines
346 B
Python
import torch
|
||
|
||
list_10 = [[[792, 436, 928, 303],
|
||
[809, 170, 778, 652],
|
||
[967, 520, 419, 184]],
|
||
[[402, 754, 327, 979],
|
||
[713, 926, 879, 934],
|
||
[540, 953, 209, 369]]]
|
||
t10 = torch.tensor(list_10)
|
||
|
||
# 切第一个维度为1,其他维度不切
|
||
print(t10[1:, :, :])
|
||
|
||
print(t10[1:, 2:, 3].item())
|