我要评分
获取效率
正确性
完整性
易理解

Running and Verification

After building and installing TensorFlow 1.15.5, use the built-in test cases to verify its basic functions. This document uses the image recognition test case to verify TensorFlow.

  1. Verify the TensorFlow version in the non-source code directory.
    1
    python3 -c "import tensorflow as tf; print(tf.__version__)"
    

    The command output shows that the version is 1.15.5.

  2. Verify basic functions.

    The following operations use the TensorFlow-provided image recognition test case as an example.

    1. Go to the compilation path for TensorFlow source code.
      1
      cd /path/to/tensorflow
      
    2. Obtain model data and verification data.
      1
      2
      curl -L "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz" | tar -C tensorflow/examples/label_image/data -xz
      wget -P tensorflow/examples/label_image/data/  https://www.tensorflow.org/images/cropped_panda.jpg --no-check-certificate
      
    3. Run the test case.
      1
      python3 tensorflow/examples/label_image/label_image.py --image=tensorflow/examples/label_image/data/cropped_panda.jpg
      

      The command output shows that there is the highest probability that image tensorflow/examples/label_image/data/cropped_panda.jpg is identified as a giant panda.