SILVER

  • 홈
  • 태그
  • 방명록

same shape 1

Error : logits and labels must have the same shape

ValueError: logits and labels must have the same shape (() vs (39, )) 이 에러,,, 너무 많이 봐서 진절머리가 난다 입사하고 초반에는 이해도가 떨어져서 한참 헤맸었는데 다시 나타난 에러,, one-hot encoding으로 금방 해결할 수 있었다. 이 글을 읽는 다른 분들은 나처럼 삽질을 하지 않았으면 하는 마음에 정리해본다. 구글링을 아무리해도 loss function을 바꿔라 ! 라는 말밖에 없는데,,, 그게 문제가 아니라 로스를 계산할 수 있는 shape로 맞춰주지 않았기때문에 오류가 뜬거였다... 계산을 못하니까 ! from tensorflow.keras.utils import to_categorical train_labels = [0,1,2..

Deep learning/Error 2021.07.01
이전
1
다음
더보기
프로필사진

SILVER

  • 분류 전체보기 (129)
    • About Me (0)
    • Language (60)
      • C# (41)
      • GoLang (6)
      • python (1)
      • React (10)
      • NextJs (1)
      • Django (1)
    • Algorithm (2)
    • Deep learning (43)
      • Error (8)
      • 환경세팅 (4)
      • Studying (15)
    • Education (1)
    • Design Pattern (3)

Tag

bayesian optimization, Brightness, c#, c##PointToScreen, class imbalance #, dat file, grid search, ins, isns, labels,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바