tensorflow tf.nn.softmax_cross_entropy_with_logits()

사용 버전: Python 3.7.6, Tensorflow 2.1.0


tensorflow(텐서플로우) tf.nn.softmax_cross_entropy_with_logits()에 대해서 알아보겠습니다.





괄호 안에는 labels, logits, axis, name 따위가 들어갑니다.

labels에는 정답표가 들어갑니다.
logits에는 계산된 결괏값이 들어갑니다.
labels와 logits의 dtype은 같아야 합니다. (float16, float 32 또는 float64)
axis에는 실제적인 값과 정답표가 있는 axis를 적습니다.
name은 이름입니다.








loss 함숫값이 나왔습니다.

이것을 평균하면, cost 함수가 나옵니다.

정답표와 실제 값이 앞에 있다면, axis=0를 해줍니다.












끝.




카테고리: Tensorflow_python, Python

댓글

이 블로그의 인기 게시물

Python OpenCV 빈 화면 만들기

Python urllib.parse.quote()

Python bytes.fromhex()

Android AVD Ram size change

Forensics .pyc 파일 .py로 복구하기

Android Minimum touch target size

KiCad 시작하기 7 (FreeRoute 사용하기 2)

Android Notification with Full Screen

C++ OpenCV 모폴로지 침식, 팽창

KiCad 시작하기 2 (PCB 만들기)