ott*_*omd 5 python machine-learning tensorflow
它表示它已被弃用,并将在未来删除.另一行说"请使用tensorflow/transform或tf.data.".我搜索了互联网,但我找不到答案.这是给我警告的线:
# Change texts into numeric vectors
vocab_processor = tf.contrib.learn.preprocessing.VocabularyProcessor(max_sequence_length,min_frequency=min_word_frequency)
Run Code Online (Sandbox Code Playgroud)
我也还没解决。一组解释如下:
tf.contrib.learn.preprocessing:
已弃用。仅限 Python 的预处理函数不太适合 TensorFlow。请使用 tf.data,并考虑使用tensorflow/transform来处理更复杂的用例。
https://github.com/tensorflow/tensorflow/blob/r1.8/tensorflow/contrib/learn/README.md
这个例子应该有帮助......但它没有解释太多 https://github.com/tensorflow/transform/blob/master/examples/sentiment_example.py
review_indices = tft.compute_and_apply_vocabulary(
review_tokens, top_k=VOCAB_SIZE)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1015 次 |
最近记录: |