Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

피너클의 it공부방

파이썬 torch.type(int64) 본문

파이썬

파이썬 torch.type(int64)

피너클 2024. 12. 10. 14:13
728x90
반응형
t = torch.tensor([0.2, 1.122, 1.9234])

위의 t를 출력하면

위의 값이 그대로 나오고 

t = torch.tensor([0.2, 1.122, 1.9234]).type(torch.int64)

위에 type(torch.int64)를 붙이면

위처럼 정수가 나온다.

1.9도 1로 나오는걸 보면 무조건 내림을 하는것 같다.

728x90
반응형

'파이썬' 카테고리의 다른 글

파이썬 torch.gather  (0) 2024.12.10
파이썬 forward  (0) 2024.12.10
Comments