일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 유가 급등
- opencv
- 세계사
- DataSet
- 비트코인
- loss
- qtdesigner
- pyqt
- terminal
- error
- Perceptron
- cv2
- Inference
- TFRecord
- itksnap
- keras
- TF
- 브렉시트
- TensorFlow
- Python
- img
- 딥러닝
- Training
- numpy
- 퍼셉트론
- dtype
- 세계대전
- deeplearning
- 블록체인
- 유로화
Archives
- Today
- Total
목록sparsecategoricalcrossentropy (1)
활연개랑
[tensorflow] 오류 해결 :ValueError: Shapes (5,) and (5, 5) are incompatible
classification 딥러닝을 training 시키려는데 다음과 같은 오류가 발생하였습니다. ValueError: Shapes (5,) and (5, 5) are incompatible 저한테 오류가 났던 이유는 Accuracy 측정용으로 아래와 같이 SparseCategoricalAccuracy를 사용하였는데, tf.keras.metrics.SparseCategoricalAccuracy() loss로는 그냥 categorical cross entropy를 사용했기 때문이었습니다. 따라서 loss를 아래와 같이 SparseCategoricalCrossentropy를 사용해주면, 오류를 해결할 수 있습니다. tf.keras.losses.SparseCategoricalCrossentropy(from_l..
딥러닝
2022. 5. 28. 17:56