私はTensorflowを使い始めました。m.fit(input_fn=lambda: self.input_fn(train_data), steps=train_steps)
を呼び出すと、次のエラーが表示されます。私はfit()
に渡す機能のカラムでTensorflow:ValueError:期待される非整数、<dtype: 'int32'>
File "/Library/Python/2.7/site-packages/tensorflow/contrib/layers/python/layers/feature_column_ops.py", line 161, in _input_from_feature_columns
transformed_tensor = transformer.transform(column)
File "/Library/Python/2.7/site-packages/tensorflow/contrib/layers/python/layers/feature_column_ops.py", line 882, in transform
feature_column.insert_transformed_feature(self._columns_to_tensors)
File "/Library/Python/2.7/site-packages/tensorflow/contrib/layers/python/layers/feature_column.py", line 991, in insert_transformed_feature
self.sparse_id_column.insert_transformed_feature(columns_to_tensors)
File "/Library/Python/2.7/site-packages/tensorflow/contrib/layers/python/layers/feature_column.py", line 572, in insert_transformed_feature
name="lookup")
File "/Library/Python/2.7/site-packages/tensorflow/contrib/lookup/lookup_ops.py", line 1018, in index_table_from_tensor
"integer" if dtype.is_integer else "non-integer", keys.dtype))
ValueError: Expected non-integer, got <dtype: 'int32'>.
、それは、そこになければならないだけint32
とint64
ですが、それは問題ではないでしょうか?
あなたはコードのサンプルを提供することができますか? – Wontonimo