mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-22 20:44:16 +08:00
18 lines
328 B
Python
18 lines
328 B
Python
import torch
|
|
|
|
|
|
list_8 = [[[792, 436, 928, 303],
|
|
[809, 170, 778, 652],
|
|
[967, 520, 419, 184]],
|
|
|
|
[[402, 754, 327, 979],
|
|
[713, 926, 879, 934],
|
|
[540, 953, 209, 369]]]
|
|
t8 = torch.tensor(list_8)
|
|
|
|
# 合并成单列单行
|
|
print(t8.view(-1))
|
|
|
|
# 拉升成4行6列
|
|
print(t8.view(4, 6))
|