Tensorflow:tf.contrib 弃用 [英] Tensorflow: tf.contrib deprecation

查看:50
本文介绍了Tensorflow:tf.contrib 弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 tensorflow 做一些 NLP,并且一直在使用 tf.contrib.lookup.index_table_from_tensor 来创建令牌查找表.

我知道 tensorflow 将在 19 年春季推出 2.0,他们说:

"tf.contrib

TensorFlow 的 contrib 模块已经超出了单个存储库中可以维护和支持的范围.较大的项目最好单独维护,而我们将孵化较小的扩展以及主要的 TensorFlow 代码.因此,作为发布 TensorFlow 2.0 的一部分,我们将停止分发 tf.contrib.在接下来的几个月中,我们将与各自的所有者合作制定详细的迁移计划,包括如何在我们的社区页面和文档中宣传您的 TensorFlow 扩展.对于每个 contrib 模块,我们将 a) 将项目集成到 TensorFlow 中;b) 将其移至单独的存储库或 c) 将其完全删除.这确实意味着所有 tf​​.contrib 都将被弃用,我们今天将停止添加新的 tf.contrib 项目.我们正在为目前在 tf.contrib 中的多个项目寻找所有者/维护者,如果您有兴趣,请联系我们(回复此电子邮件)."

那么两个问题:

1) 还有另一种方法可以在 Tensorflow 中轻松构建查找表吗?

2) 我无法确定此功能将包含在 2.0 中的可能性有多大.有什么提示吗?

谢谢!

解决方案

  1. 您应该能够在 tensorflow 2.0 下使用 lookup 功能.
  2. tensorflow.contrib.lookup 将在 tensorflow 2.0 之后移动到核心

根据 https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md#list-of-projects.

<块引用>

项目列表本节列出了当前在 tf.contrib 中的所有项目的可能命运.这里的决定是初步的,并不是所有的业主都被联系过(标有 * 的人没有).括号中列出的是对此有潜在兴趣但不是所有者的人.

如果您对其中一个项目感兴趣,但未被指定为所有者(或利益相关方),请直言不讳.我已经添加了一些(暂定的)移动目标到尚不存在的存储库:tensorflow/io、tensorflow/contrib(我更喜欢一个更好的名称),并且 tensorflow/scientific 都需要新的 SIG 来维护它们.

请注意,任何没有指定其他命运的项目(包括转移到由 SIG 暂时维护的存储库,但实际上并未形成 SIG 的项目)将在 2.0 中默认删除.

I've been doing some NLP using tensorflow and have been using tf.contrib.lookup.index_table_from_tensor to create a look-up table for tokens.

I know tensorflow is coming out with 2.0 in Spring '19 and they've said:

"tf.contrib

TensorFlow’s contrib module has grown beyond what can be maintained and supported in a single repository. Larger projects are better maintained separately, while we will incubate smaller extensions along with the main TensorFlow code. Consequently, as part of releasing TensorFlow 2.0, we will stop distributing tf.contrib. We will work with the respective owners on detailed migration plans in the coming months, including how to publicise your TensorFlow extension in our community pages and documentation. For each of the contrib modules we will either a) integrate the project into TensorFlow; b) move it to a separate repository or c) remove it entirely. This does mean that all of tf.contrib will be deprecated, and we will stop adding new tf.contrib projects today. We are looking for owners/maintainers for a number of projects currently in tf.contrib, please contact us (reply to this email) if you are interested."

Two questions then:

1) Is there another way to build a lookup-table easily in Tensorflow?

2) I couldn't determine how likely it is that this functionality will be included in 2.0. Is there any indication?

Thanks!

解决方案

  1. You should be able to use the lookup functionality under tensorflow 2.0.
  2. The tensorflow.contrib.lookup will move to the core after tensorflow 2.0

According to https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md#list-of-projects.

List of Projects This section lists the possible fate of all projects currently in tf.contrib. The decisions here are preliminary, not all owners have been contacted (those marked with a * have not). Named in parentheses are people with a potential interest in this, but who are not owners.

If you have an interest in one of these projects and are not named as an owner (or as an interested party), please speak up. I've added some (tentative) move targets to as of yet nonexistent repositories: tensorflow/io, tensorflow/contrib (I would prefer a better name for this), and tensorflow/scientific will all require new SIGs to maintain them.

Note that any project that has no other fate specified (including those moving to a repo tentatively maintained by a SIG, but for which no SIG is actually formed) will be deleted by default at 2.0.

这篇关于Tensorflow:tf.contrib 弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆