[Pytorch] RuntimeError: CUDA error: device-side assert triggered

2023. 1. 29. 21:06·Error Note
728x90
반응형
반응형

- 전체 에러 문구

RuntimeError: CUDA error: device-side assert triggered

​/pytorch/aten/src/ATen/native/cuda/Indexing.cu:699: indexSelectLargeIndex: block: [129,0,0], thread: [127,0,0] Assertion `srcIndex < srcSelectDimSize` failed.

​

​

Pytorch의 nn.embedding() 레이어에 유효하지 않은 값(-1 이나 nan)이 입력으로 들어갔을 때 발생하는 에러입니다. 저의 경우에는 -1이 입력으로 들어가 발생하였습니다.

​

​

- 해결 방법

유효한 입력값이 들어갈 수 있도록 수정해주었습니다.

​

이외에도 아래의 경우에 에러가 발생할 수 있습니다!

- 실제 데이터셋과 다르게 출력(output) 차원의 크기를 설정했을 때와

- 실제 데이터셋과 다르게 입력(input) 차원의 크기를 설정했을 때

에도 발생할 수 있는 에러입니다.

​

728x90
반응형
저작자표시 (새창열림)

'Error Note' 카테고리의 다른 글

RuntimeError: result type Float can't be cast to the desired output type Long  (0) 2023.01.30
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor,,,  (0) 2023.01.30
[Tensorflow] Invalid argument: Subshape must have computed start >= end since stride is negative,,,  (0) 2023.01.29
[Pytorch] RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn  (0) 2023.01.29
TypeError: Encoders require their input to be uniformly strings or numbers. Got ['int', 'str']  (0) 2023.01.29
'Error Note' 카테고리의 다른 글
  • RuntimeError: result type Float can't be cast to the desired output type Long
  • TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor,,,
  • [Tensorflow] Invalid argument: Subshape must have computed start >= end since stride is negative,,,
  • [Pytorch] RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
ga.0_0.ga
ga.0_0.ga
    반응형
    250x250
  • ga.0_0.ga
    ##뚝딱뚝딱 딥러닝##
    ga.0_0.ga
  • 전체
    오늘
    어제
    • 분류 전체보기 (181)
      • Paper Review (51)
        • Video Scene Graph Generation (6)
        • Image Scene Graph Generation (18)
        • Graph Model (5)
        • Key Information Extraction (4)
        • Fake Detection (2)
        • Text to Image (1)
        • Diffusion Personalization (4)
        • etc (11)
      • AI Research (49)
        • Deep Learning (30)
        • Artificial Intelligence (15)
        • Data Analysis (4)
      • Pytorch (10)
      • ONNX (5)
      • OpenCV (2)
      • Error Note (34)
      • Linux (2)
      • Docker (3)
      • Etc (7)
      • My Study (16)
        • Algorithm (10)
        • Project (4)
        • Interview (2)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    GCN
    그래프신경망
    HRNet
    contiguous
    dataset
    오차 역전파
    Activation Function
    torch.nn
    RuntimeError
    transformer
    fine tuning
    tensorflow
    Logistic regression
    3dinput
    pytorch
    알고리즘
    차원의 저주
    dataloader
    forch.nn.functional
    JNI
    i3d
    TypeError
    나이브 베이즈 분류
    정규화
    pandas
    ONNX
    Inductive bias
    permute
    linear regression
    활성화 함수
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
ga.0_0.ga
[Pytorch] RuntimeError: CUDA error: device-side assert triggered
상단으로

티스토리툴바