我们在实际使用的时候,通常情况下是调用 TensorFlow 提供的接口来构建特征的。...__new__(cls, sparse_id_column, weight_column_name, dtype)
_WeightedSparseColumn 需要 3 个参数:sparse_id_column...这里有几个隐含要求:
(1)dtype 需要能够转换成浮点数类型,否则会抛 TypeError;
(2)weight_column_name 对应的 weight column 可以是一个 SparseTensor...dtype=dtypes.string)
对应的构造函数为:
def __new__(cls, column_name, vocabulary_file, num_oov_buckets=0, vocab_size...__new__(cls, column_name,combiner=combiner,
lookup_config=_SparseIdLookupConfig(vocabulary_file=vocabulary_file