일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 브렉시트
- dtype
- cv2
- qtdesigner
- opencv
- Perceptron
- img
- Training
- Inference
- 세계사
- deeplearning
- TF
- 유로화
- DataSet
- loss
- 유가 급등
- terminal
- TensorFlow
- Python
- itksnap
- 딥러닝
- numpy
- error
- keras
- 블록체인
- 퍼셉트론
- TFRecord
- 비트코인
- pyqt
- 세계대전
- Today
- Total
목록Inference (2)
활연개랑
Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: inference 를 하는 과정에서 predict 값을 구하기 위해 model에 x값을 넣어주었을 때 다음과 같은 오류가 발생하였습니다. x의 shape은 (300,400)이었으나, model로 들어갈 때 (batch, width,height, channel)형태로 들어가 주어야 하기 때문입니다. t_x = t_x.reshape(1, t_x.shape[0], t_x.shape[1], 1) pred = model(t_x) 위와 같이 reshape을 해주면 잘 들어갑니다!
model inference 과정에서 다음과 같은 오류가 발생했습니다. ValueError: Exception encountered when calling layer "epvs_conv" (type EPVS_CONV). Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (300, 400) Call arguments received: • inputs=tf.Tensor(shape=(300, 400), dtype=float32) 다음과 같은 오류가 발생한 이유는 shape이 맞지 않아서 입니다. 제가 만든 모델에는 dimension이 4인 input (bat..