gpt4 book ai didi

python-3.x - 0 和 1 的 Tensorflow 特征列

转载 作者:行者123 更新时间:2023-12-04 17:47:48 25 4
gpt4 key购买 nike

对于 Tensorflow 特征列包含 bool 值 0 和 1。

我应该使用 tf.feature_column.numeric_column

tf.feature_column.categorical_column_with_vocabulary_list

最佳答案

您可以使用 sequence_categorical_column_with_identity :

tf.feature_column.sequence_categorical_column_with_identity('YOUR_FEATURE',2)

第二个参数是桶的数量。如果你的特征中有 n 个连续的整数 [0,1,2 .. ,n-1],那么你可以这样写:

tf.feature_column.sequence_categorical_column_with_identity('YOUR_FEATURE',n)

关于python-3.x - 0 和 1 的 Tensorflow 特征列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47646159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com