본문 바로가기
  • 🐜일개미의 기록: 독서, 일상🐜
일개미의 생활 ∙̑◡∙̑/공부

Lesson4-8: Logistic Regression

by 짝은개미 2021. 9. 21.

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 형태로 변환

댓글