torchscript로 model을 저장하기 위해... numpy 연산을 없애야만 했다. onnx 및 torch::jit::scriptModule로 변환을 하는 데 있어서 trace-based exporter가 numpy value를 잘 trace할 수 없다고 한다. PyTorch models can be written using numpy manipulations, but this is not proper when we convert to the ONNX model. For the trace-based exporter, tracing treats the numpy values as the constant node, therefore it calculates the wrong result if we ch..
Error AttributeError: module 'torch' has no attribute 'argsort' 원인 1. pytorch 1.0 이상의 version을 사용하지 않아서. pytorch 0.4.1 같은 1.0 미만의 version에는 argsort 함수가 구현되어 있지 않다. Solution 1. pytorch upgrade python3 -m pip install torch==1.0 이렇게 version을 직접 정해주거나 아니면 그냥 torch만 입력하면 가장 최신 version으로 install해준다. uninstall torch==0.4.1을 하고 하면 더 좋겠지만 안그래도 큰 문제는 없음. 2. 직접 argsort 구현 or np.argsort 로 대체하기. 이 경우는 pytorc..
warning message /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) 다음과 같은 error message를 검색해보니 tensorflow version과 numpy version이 충돌나서 생기는 문제였다. 나..
- Total
- Today
- Yesterday
- 설치
- dfs
- n과m
- 동적프로그래밍
- CUDA
- BFS
- 다익스트라
- 코딩테스트
- shellscript
- numpy
- version
- 백준
- error
- tensorflow
- 백트래킹
- Python
- LGSVL
- 설치하기
- 최소신장트리
- torchscript
- 파이썬
- torch
- PIP
- 이것이코딩테스트다
- notfound
- 카카오
- pytorch
- 프로그래머스
- matplotlib
- docker
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |