일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- img
- 유가 급등
- Perceptron
- itksnap
- deeplearning
- TFRecord
- Python
- TensorFlow
- dtype
- 세계대전
- 블록체인
- 브렉시트
- Training
- opencv
- DataSet
- qtdesigner
- 퍼셉트론
- TF
- keras
- 비트코인
- pyqt
- 유로화
- cv2
- numpy
- 세계사
- Inference
- error
- loss
- 딥러닝
- terminal
Archives
- Today
- Total
목록TF (2)
활연개랑
[tensorflow] tf.numpy_function() dim error 문제해결
tf.numpy_function을 사용할 때 dim 관련 오류가 날 수 있습니다. tf.numpy_function을 이미지에 사용할 경우 reshape이 필요하기 때문에 다음과 같이 reshape을 해주어야 합니다. image_shape = tf.shape(image) image = tf.numpy_function(definition(func), [image], tf.float32) image = tf.reshape(image, image_shape) 이렇게 reshape을 해주면 dimensipn오류를 해결할 수 있습니다.
Python
2022. 5. 8. 19:10
[Tensorflow] TypeError: Input 'bytes' of 'DecodeRaw' Op has type int64 that does not match expected type of string.
tfrecord를 만들 때 발생하는 에러 TypeError: Input 'bytes' of 'DecodeRaw' Op has type int64 that does not match expected type of string. parsing하는 과정에서 label parsing을 다음과 같이 했을 때 위 오류가 발생했다. label = tf.io.decode_raw(features['train/label'], tf.int64) label = tf.cast(label, tf.int64) 하지만, label에서는 decode_raw를 사용할 필요 없이 label = features['train/label'] 이렇게만 작성해주면 된다.
Python
2022. 4. 8. 10:52