Softmax, Cross entropy, Logistic Regression model, Acc 를 구하는 함수
1. Softmax
tf.math.reduce_sum(exp, 1, keepdims=True)
0: 열단위 합
1: 행단위 합
2. Cross entropy
tf.boolean_mask(tensor, mask, name, axis) 이용하면 훨씬 빠르게 구할 수 있음

3. Accuracy
tf.cast : tensor를 새로운 형태로 cast
첫번째 인자를 변환시킬 인자(두번째)로 넣으면 됨
tf.cast(image, tf.float32): float 형태로 변환

'일개미의 생활 ∙̑◡∙̑ > 공부' 카테고리의 다른 글
Lesson2: The Machine Learning Workflow 마무리 (2) | 2021.08.17 |
---|---|
Lesson2-10. Exercise: Choosing Metrics (iou.py, precision_recall.py ) (1) | 2021.08.03 |
딥러닝교육 정리_1 (0) | 2021.04.25 |
댓글