将Tensorflow分布更新为Tensorflow概率

时间:2019-01-13 22:47:30

标签: tensorflow build

正如标题所述,我想将Tensorflow发行版更新为Tensorflow概率。我正在按照本教程从源代码构建Tensorflow。 https://medium.com/searce/installing-tensorflow-gpu-with-nvidia-cuda-on-a-google-cloud-platform-vm-instance-b059ea47e55c

当我尝试使用bazel构建tensorflow时,收到此警告。

    WARNING: /home/tensorflow/tensorflow/contrib/bayesflow/BUILD:17:1: in 
    py_library rule //tensorflow/contrib/bayesflow:bayesflow_py: target 
   '//tensorflow/contrib/bayesflow:bayesflow_py' depends on deprecated 
    target '//tensorflow/contrib/distributions:distributions_py': 
    TensorFlow Distributions has migrated to TensorFlow Probability 
    (https://github.com/tensorflow/probability). Deprecated copies 
    remaining in tf.contrib.distributions are unmaintained, unsupported, 
    and will be removed by late 2018. You should update all usage of 
    `tf.contrib.distributions` to `tfp.distributions`.

由于我是从资源构建Tensorflow的新手,所以我尝试确切地搜索如何执行此操作,但是我无法获得足够的信息。

init .py文件中,

“”“类代表统计分布以及与它们一起使用的操作。 请改用tfp.distributions。 “”“

这是否意味着我应该将Tensorflow概率中的所有文件添加到当前的tensorflow文件夹中?并重写init文件以删除不赞成使用的Tensorflow发行版?我不确定该怎么做。

如果您可以为我提供执行此操作的资源或与此问题相关的任何内容,那将很有帮助。

谢谢。

1 个答案:

答案 0 :(得分:0)

从源代码完成TF构建后,将剩下一个需要pip安装的.whl文件。然后,您还应该每晚安装pf-tfp,这是TF概率的每晚包装。您也可以按照TFP GitHub页面上的说明从源代码安装TFP。请注意,如果您想要的只是这两个软件包的最新功能,则仅安装tf-nightly和tfp-nightly将非常接近源代码构建。如果您想修改TF库,那么从源代码构建是一种方法。

希望这会有所帮助!