python - TensorFlow 1 中的 TensorBoard 使用 Google Colab
问题描述
我想在 Google Colab 的 TensorFlow 1 中使用 TensorBoard。我发现的教程似乎在 TensorFlow 2 上,而这些建议似乎在 TensorFlow 1 中不起作用。
看来我需要一些等效于 tf.summary.create_file_writer 和 tf.summary.scalar。我已经尝试过 tf.contrib.summary.create_file_writer 和 tf.contrib.summary.scalar,但这些似乎不起作用。
这是我的问题的娱乐:
https://colab.research.google.com/drive/1M3CL0oasd8pCjXLaaHl15I1yz-LUXNhq
解决方案
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
get_ipython().system_raw('tensorboard --logdir /content/trainingdata/objectdetection/ckpt_output/trainingImatges/ --host 0.0.0.0 --port 6006 &')
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'])"
这为您提供了来自创建的日志文件的张量板。它适用于 TF1.13
推荐阅读
- scala - Type Option[java.sql.Timestamp] 不能用作默认值
- scala - 面临测试akka http缓存的问题
- laravel-queue - 如何在没有延迟的情况下获得 laravel 队列大小?
- android - 尝试访问基于 Firebase 的登录时出错
- react-native - 如何使用 createStackNavigator 将 createBottomTabNavigator 添加到同一屏幕
- javascript - 如何使用 node js 中的 requestPromise 在 url 中动态填充 ${moduleName}、${value}、${key} 值
- java - 从 postgres 检索(印地语或英文字体数据)时的数据格式是什么
- java - 如何避免 JPA 一对多映射(同一模型中的两个一对多关系)中的冗余数据(列表获取)?
- apache - 无法访问 Letsencrypt SSL 站点
- python - 如何在 VSCode 的窗格中显示 python 环境对象?