일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- ros2 remapping
- CODEUP 6073
- 22.04 ros2 설치
- docker foxy
- ros2 param dump
- ros2 param list
- ros2 foxy understanding parameters
- ros2 튜토리얼
- nav2 doc behavior trees
- ubuntu ros2 설치
- 코드업
- error
- ros2 humble install
- ros2 param get
- ubuntu humble 설치
- nav2 behavior trees
- ROS FOXY 튜토리얼
- ros2 foxy 튜토리얼
- ros2 param load
- ros2 foxy tutorial
- Foxy tutorial
- ros2 param set
- nav2 행동트리
- ros2 foxy docker
- ros2 foxy parameters
- foxy nav2
- Nav2 document
- CodeUp
- ROS2 Humble 설치
- Python
Archives
- Today
- Total
BAN2ARU
[Python/Pytorch] TORCH.IS_TENSOR : Torch Tensor 여부 확인 본문
torch.is_tensor(obj )
obj가 PyTorch tensor라면 True를 return함
이 함수는 isinstance(obj, Tensor)을 수행하며, mypy를 통해 typechecking시에는 isinstance를 활용하는 편이 더 좋음
Parameters
obj (Object) - test할 객체(object)
Example
>>> import torch
>>> a = torch.tensor([1, 3, 5])
>>> torch.is_tensor(a)
True
>>> b = [1, 3, 5]
>>> torch.is_tensor(b)
False
Reference
https://pytorch.org/docs/stable/torch.html
728x90
'Language > Python' 카테고리의 다른 글
Comments