實作mnist資料集時有遇到下述的錯誤訊息:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models. |
原始碼(下述程式是要將mnist資料集的圖片顯示出來):
import tensorflow.examples.tutorials.mnist.input_data as input |
這時候只要設定log的級別,就可以忽略掉此錯誤並且正確執行: (放在import numpy as np之後)
import tensorflow as tf |
執行結果:
Extracting MNIST_DATA/train-images-idx3-ubyte.gz Extracting MNIST_DATA/train-labels-idx1-ubyte.gz Extracting MNIST_DATA/t10k-images-idx3-ubyte.gz Extracting MNIST_DATA/t10k-labels-idx1-ubyte.gz |