【问题标题】:Using tensorflow.contrib.data.Dataset in Cloud ML在 Cloud ML 中使用 tensorflow.contrib.data.Dataset
【发布时间】:2017-09-21 13:07:27
【问题描述】:

最近我将 tensorflow 中的数据管道从线程更改为新的 Dataset api,一旦您想在每个 epoch 验证您的模型,这将非常方便。

我注意到current runtime version of tensorflow in Cloud ML is 1.2。不过,我尝试使用nightly build of tensorflow v1.3,但 pip 安装失败:

AssertionError: tensorflow==1.3.0 .dist-info directory not found
Command '['pip', 'install', '--user', '--upgrade', '--force-reinstall', '--no-deps', u'tensorflow-1.3.0-cp27-none-linux_x86_64.whl']' returned non-zero exit status 2

有人成功使用 tensorflow.cotrib.data.Dataset 和 Cloud ML 引擎吗?

【问题讨论】:

    标签: tensorflow google-cloud-platform tensorflow-gpu google-cloud-ml google-cloud-ml-engine


    【解决方案1】:

    这对我有用:创建一个包含以下内容的 setup.py 文件:

    from setuptools import find_packages
    from setuptools import setup
    
    REQUIRED_PACKAGES = ['tensorflow==1.3.0']
    
    setup(
        name='trainer',
        version='0.1',
        install_requires=REQUIRED_PACKAGES,
        packages=find_packages(),
        include_package_data=True,
        description='Upgrading tf to 1.3')
    

    有关 setup.py 文件的更多信息,请访问:Packaging a Training Application

    【讨论】:

      猜你喜欢
      • 2018-09-19
      • 1970-01-01
      • 2018-07-12
      • 2019-10-13
      • 1970-01-01
      • 1970-01-01
      • 2017-08-03
      • 2018-03-24
      • 1970-01-01
      相关资源
      最近更新 更多