我有一个看起来像[1, 'abcdthisisahash', 23.4]
(int,string,float)的数据集。在
我正在跟踪abalone example,并尝试在上面数据集的csv中加载,但是我遇到了ValueError: An initializer for variable dense/kernel of <dtype: 'string'> is required
。它在first_hidden_layer = tf.layers.dense(features["x"], 10, activation=tf.nn.relu)
行退出
我正在加载数据training_set = tf.contrib.learn.datasets.base.load_csv_without_header(
filename='training.csv', target_dtype=np.float64, features_dtype=None)
我觉得数组“dtype”没有正确定义。将features_dtype
设置为None
将生成第一列和第二列字符串。target_dtype
是正确的。如何正确定义“dtype”?我找不到任何关于在numpy数组中有多个数据类型的信息
目前没有回答
相关问题 更多 >
编程相关推荐