Thursday, March 1, 2018

Tensorflow: Softmax cross entropy with logits becomes inf

Leave a Comment

I am working on the Tensorflow for poets tutorial. Most of the time, training fails with an error Nan in summary histogram. I run the following command on the original data to retrain:

python -m scripts.retrain       --bottleneck_dir=tf_files/bottlenecks       --model_dir=tf_files/models/       --summaries_dir=tf_files/training_summaries/"${ARCHITECTURE}"       --output_graph=tf_files/retrained_graph.pb       --output_labels=tf_files/retrained_labels.txt      --image_dir=/ml/data/images 

This error occurred in other mentions as well. I followed the instructions there using tfdg which gave me a bit more insight (see below). However, I am still stuck because I do not know why this happens and what I can do to fix it without much experience in TF and neural networks. This is especially confusing because it happens with 100% tutorial code & data.

Here is the output from tfdg. The first time the error appears:

tfdg output for the node with the error And the node in detail:

enter image description here

To look at the retrain script you can find Google's original code here. It was not modified in my case. Sorry for not including it (too many characters).

1 Answers

Answers 1

Are you sure tf_files folder is being created? I faced some issue on command line python. I switched to spyder and changed the variable data of input as required in retrain.py and it runs smoothly. I know, it's not a solution but a turnaround.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment