【问题标题】:Error on trying to use tensorboard with google colab尝试将 tensorboard 与 google colab 一起使用时出错
【发布时间】:2019-08-24 17:52:15
【问题描述】:

我在尝试将 tensorboard 与 google collab 一起使用时遇到错误。 我正在使用 ngork 运行张量板。错误如下

我用来做上述操作的代码如下

LOG_DIR = '/content/drive/My Drive/Practice/Su'
get_ipython().system_raw(
    'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
    .format(LOG_DIR)
)

!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux- 
amd64.zip
!unzip ngrok-stable-linux-amd64.zip

get_ipython().system_raw('./ngrok http 6006 &')

! curl -s http://localhost:4040/api/tunnels | python3 -c \
    "import sys, json; print(json.load(sys.stdin)['tunnels'][0] 
['public_url'])"

【问题讨论】:

    标签: python tensorflow tensorboard google-colaboratory


    【解决方案1】:
    【解决方案2】:

    这是一个对我有用的解决方案:

    先卸载tensorboard和ten​​sorflow:

    !pip3 uninstall tensorboard
    !pip3 uninstall tensorflow
    

    然后安装 tf-nightly:

    !pip3 install --ignore-installed tf-nightly
    

    然后在 google colab 中运行 tensorboard:

    %load_ext tensorboard
    %tensorboard --logdir {logs_base_dir}
    

    【讨论】:

      猜你喜欢
      • 2021-01-29
      • 2018-05-28
      • 2019-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-12
      • 1970-01-01
      相关资源
      最近更新 更多