Tensorflow One Hot Encoder?

后端 未结 15 1702
一生所求
一生所求 2020-12-04 13:46

Does tensorflow have something similar to scikit learn\'s one hot encoder for processing categorical data? Would using a placeholder of tf.string behave as categorical data

15条回答
  •  旧巷少年郎
    2020-12-04 14:48

    Take a look at tf.nn.embedding_lookup. It maps from categorical IDs to their embeddings.

    For an example of how it's used for input data, see here.

提交回复
热议问题