golbin / TensorFlow-Tutorials

텐서플로우를 기초부터 응용까지 단계별로 연습할 수 있는 소스 코드를 제공합니다

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

4장 softmax_cross_entropy_with_logits_v2 질문입니다.

rycont opened this issue · comments

python 3.6.8에 tf 1.2.0입니다. cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits_v2(labels=Y, logits=model))라는 코드(70페이지 2번째 줄 혹은 깃헙링크)에서 module 'tensorflow.python.ops.nn' has no attribute 'softmax_cross_entropy_with_logits_v2'라는 오류가 납니다. 왜 저런 오류가 나는지 궁금합니다.

https://github.com/tensorflow/docs/tree/r1.2/site/en/api_docs/python/tf/nn

해당 함수는 tf1.2.0에는 없었습니다. softmax_cross_entropy_with_logits로 바꾸던가, 해당 함수가 지원되는 tf1.5 이상의 버전으로 업데이트해야 합니다.