- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在运行 tensorflow 0.11。这是我刚刚从 TensorFlow 教程中复制的用于加载 CSV 数据集的代码。
import tensorflow as tf
import numpy as np
IRIS_TRAINING = "iris_training.csv"
IRIS_TEST = "iris_test.csv"
# Load datasets.
training_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TRAINING, target_dtype=np.int)
test_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TEST, target_dtype=np.int)
AttributeError: 'module' object has no attribute 'load_csv'
我的问题是我在 mac 中运行了相同的示例,它工作正常,但是当我在 ubuntu 14.04 LTS 中运行它时,它显示了此错误。有人可以帮忙解决这个问题吗?
最佳答案
当我尝试使用tensorflow关于Iris数据集的教程时,我在Mac上遇到了同样的问题。当我读到有关“tf.contrib.learn.datasets.base”的 tensorflow 代码时,该函数的名称实际上是“load_csv_with_header”,带有三个参数。所以试试这个:
#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)
希望这能解决问题。
关于python-2.7 - 由于 AttributeError : 'module' object has no attribute 'load_csv' ,Tensorflow 示例全部失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39853281/
我正在尝试遵循这个使用 load_csv 函数的 tensorflow 教程。 TUTORIAL_LINK 有问题的两行之一是: IRIS_TEST = "iris_test.csv" test_se
我正在 OSX 上开始使用 Tensorflow,并按照 pip 安装指南安装了最新版本: echo $TF_BINARY_URL https://storage.googleapis.com/ten
我正在运行 tensorflow 0.11。这是我刚刚从 TensorFlow 教程中复制的用于加载 CSV 数据集的代码。 代码 import tensorflow as tf import num
https://github.com/pandas-dev/pandas/pull/2708说其他类型的传播正在工作,但是,我无法将十六进制编码值加载到 int32 中,它们作为 int64 进入数据
我正在使用 Lampp 与 Mysql 内置版本 5.6.16 和 toad for mysql 我想将数据加载到位于 c/temp 目录中的 csv 文件文件可以使用 .csv 扩展名 有数据的表是
我是一名优秀的程序员,十分优秀!