在TensorFlow快速入門教程中,我想將虹膜訓練/測試csv文件放在哪個文件夾中,以便讓我使用此代碼。我特別在使用load_csv_with_header模塊時遇到問題,並且對編程不熟悉,當他們說「將這些文件放在與您的Python代碼相同的目錄中」時,我就迷失了方向。在我看來,似乎有幾個目錄可能會滿足這一點,但最終沒有結果。我也嘗試在解釋器中輸入getcwd(),但它說沒有定義模塊。我使用python 2.7和最新版本的andaconda來做到這一點。TensorFlow虹膜load_csv_with_header()
# Data sets
IRIS_TRAINING = "iris_training.csv"
IRIS_TEST = "iris_test.csv"
# Load datasets.
training_set = tf.contrib.learn.datasets.base.load_csv_with_header(
filename=IRIS_TRAINING,
target_dtype=np.int,
features_dtype=np.float32)
test_set = tf.contrib.learn.datasets.base.load_csv_with_header(
filename=IRIS_TEST,
target_dtype=np.int,
features_dtype=np.float32)