Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- raspberry pi
- windows
- python
- colab
- colaboratory
- dataset
- error
- shakeratos
- linux
- CUDA
- YouTube 8M
- FIle
- object detection
- install
- face_recognition
- keras
- dlib
- urllib
- download
- ubuntu
- 딥러닝
- python3
- Deep Learning
- Windows 10
- TensorFlow
- Anaconda
- pyTorch
- ppc64le
- gpu memory
- Jupyter notebook
Archives
- Today
- Total
Shakerato
pytorch "RuntimeError: ~ inplace operation" for CUDA 본문
def __init__(self, input_size, hidden_size, num_layers=2):
super().__init__()
self.lstm = nn.LSTM(input_size, hidden_size, num_layers)
def forward(self, features, init_hidden=None):
self.lstm.flatten_parameters()
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
Move the self.lstm.flatten_parameters() in def foward() to def __init__.
It has no effect on CPU, but on CUDA it will modify the LSTM's parameters part way through the computation which would break backward (leading to the exception). (reference: https://github.com/pytorch/pytorch/issues/7243)
'Research' 카테고리의 다른 글
GPU devices checking tips for Deep Learning (Be careful!) (0) | 2019.01.16 |
---|---|
Counting files with extension in linux (0) | 2019.01.13 |
CUDA 9.2가 깔려있어도 CUDA 9.0을 참조해 에러나는경우, ImportError: libcublas.so.9.0 (0) | 2018.09.07 |
Set timeout for urllib urlretrieve download files (0) | 2018.08.18 |
'no module named six.moves' in ubuntu (0) | 2018.08.17 |
Comments