newbie questions (linear regression example from the WWW)

74 views
Skip to first unread message

pkhgr...@gmail.com

unread,
Jul 24, 2017, 4:59:12 AM7/24/17
to Discuss
Hallo, 
Was a mathematician (now 75 years young ;-) and got interested in tensorflow.
running : python wide_n_deep_tutorial.py --model_type =wide
It worked but gave very much warnings etc. where I need some help for.

Is this the right place???
Examples: 
This is OK:
Training data is downloaded to C:\Users\Peter\AppData\Local\Temp\tmp_vb_qvqo
Test data is downloaded to C:\Users\Peter\AppData\Local\Temp\tmp8nzzj2wo
model directory = C:\Users\Peter\AppData\Local\Temp\tmplqbco9x9

Got this WARNING several times:
WARNING:tensorflow:The default stddev value of initializer will change from "1/sqrt(vocab_size)" to "1/sqrt(dimension)" after 2017/02/25.

I do not like Warnings I do not understand. We are now in July and tensorflow is lately installed, Why NOW a Warning?

Next Warning:
WARNING:tensorflow:Rank of input Tensor (1) should be the same as output_rank (2) for column. Will attempt to expand dims. It is highly recommended that you resize your input, as this behavior may change.
??

Most interesting: how to solve this:
2017-07-24 10:32:02.492491: W c:\l\work\tensorflow-1.1.0\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.


And as info, the last rows of the output:
WARNING:tensorflow:Skipping summary for global_step, must be a float or np.float32.
accuracy: 0.84184
accuracy/baseline_label_mean: 0.236226
accuracy/threshold_0.500000_mean: 0.84184
auc: 0.890017
global_step: 200
labels/actual_label_mean: 0.236226
labels/prediction_mean: 0.240738
loss: 0.345022
precision/positive_threshold_0.500000_mean: 0.720736
recall/positive_threshold_0.500000_mean: 0.539522

Greets
       Peter


Benjamin Ellenberger

unread,
Jul 24, 2017, 6:07:06 AM7/24/17
to pkhgr...@gmail.com, Discuss
Hello Peter,

Welcome to TensorFlow discuss. We are very happy we have such young people in the community using tensorflow :)! This list is intended for general discussions about TensorFlow development and directions, not as a help forum. Instead, direct your questions to Stack Overflow. I will answer your questions nonetheless.

A note on warnings in software libraries: The severity of warnings can vary a lot. Some of them really say that you are doing something weird and they let you know about it. Some say that something will change in the future, so you can be aware of that if you update to the next version next time. And some can just be a note on something you could do if you are interested in more speed, accuracy, better output or debug capabilities etc. So you see, warnings are not the same as the small light blinking in your car saying it is going to break down immediately.

So let me explain your warnings one after another:
WARNING:tensorflow:The default stddev value of initializer will change from "1/sqrt(vocab_size)" to "1/sqrt(dimension)" after 2017/02/25.
 You do not have to care too much about this as a beginner. This basically means that your feature column initialization lacks a stddev defition, so it defaults to whatever is in the code. The default will change after 2017/02/25, so from now on the stddev is 1/sqrt(dimension).

WARNING:tensorflow:Rank of input Tensor (1) should be the same as output_rank (2) for column. Will attempt to expand dims. It is highly recommended that you resize your input, as this behavior may change.  

This means that one of your tensors had a different rank from what was expected. From what I remember, the dimensions will be expanded automatically with [0,0,0,...] rows/columns so that it can be used. In the future, your code might break since this behavior might change. Since you are just starting, you will probably be using more tutorial code, so do not try to fix this.

2017-07-24 10:32:02.492491: W c:\l\work\tensorflow-1.1.0\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.  

Did you install tensorflow from the pip repository directly and you are not using a GPU? No worries, I think for most beginners that is exactly the right way, since it gets you started quickly, no matter what all the cloud power and GPU sellers are telling you. For serious things involving larger data sets possibly including images and stuff, you should consider upgrading to a GPU. The warning means that your installed tensorflow package was not made to use SSE instructions (SSE is a chip set on your processor speeding up certain computations). The package distributed online is not compiled for this. But do not get all excited about SSE speedups, for a personal computer, these are pretty marginal.

So to sum up, warnings in software libraries in serveral case are your friends. As a mathematician, this might sound strange, but Machine Learning is a very interdisciplinary field, so the strict rules of mathematics are not applied everywhere :) (No offense, we need the mathematicians in the field, they are the ones which will provide us with some convergence guarantees or why all the deep learning works so well eventually. Until then, engineering rules apply (trial and error, what if I only approximate this etc.).

Greetings,

Ben

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/ec659832-f6c0-4b6c-8e30-372878e081f4%40tensorflow.org.
Reply all
Reply to author
Forward
0 new messages