Common mistakes made by TensorFlow beginners

一、Your CPU supports instructions that this TensorFlow binary was not compiled to use 
This problem is to remind you to improve the computing speed of the CPU. If we already have a GPU that supports cuda, we can ignore this problem, because installing SSE4.1, SSE4.2, AVX, AVX2, FMA only increases the computing speed of the CPU (about three times as much)

Solution: 1. Ignore the warning and block the warning. Start by typing:

                        import them

                        os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

                2. Enter the tensorflow official website and install it from the source code.

二、运行tensorflow测试程序时,出现:FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.

  from ._conv import register_converters as _register_converters

Solution: Enter pip install h5py==2.8.0rc1

三、SyntaxError: Missing parentheses in call to 'print'

This problem occurs because the python demo you are using is inconsistent with the python version installed on your computer. One is python2 and the other is python3. The correction method is to change it to the syntax format of python that matches your computer, such as changing print result to print (result)

4. IndentationError: expected an indented block error occurs

This error occurs because the Python language is very sensitive to reduction, and this error means that indentation is required here.

The rule is: the next line of code with a colon at the end often needs to be indented.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325870813&siteId=291194637