tensorboard --logdir=runs 不工作:中止陷阱:6 [英] tensorboard --logdir=runs not working: Abort trap: 6

查看:19
本文介绍了tensorboard --logdir=runs 不工作:中止陷阱:6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行张量板:tensorboard --logdir=runs.
我也试过:tensorboard --logdir=runs --host=127.0.0.1.
我正在从包含 runs 文件夹的目录中的终端运行命令.

我收到以下错误:

[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1367]检查失败:GeneratedDatabase()->Add(encoded_file_descriptor, size):libc++abi.dylib:以 google::protobuf::FatalException 类型的未捕获异常终止:检查失败:GeneratedDatabase()->Add(encoded_file_descriptor, size):中止陷阱:6

我的 Python 代码包含以下几行:

tb_path = './runs/SimpleLSTM_MNIST'如果 os.path.isdir(tb_path):关闭.rmtree(tb_path)writer = tb.SummaryWriter(log_dir=tb_path)

我的runs文件夹包含文件夹SimpleLSTM_MNIST,其中包含events.out.tfevents.1591953948.computername.local.29440.0.>

操作系统:MacOS Catalina

我该如何解决问题?

解决方案

显然这是在运行 macOS Catalina 时出现的特定问题,可以通过切换到 protobuf version 3.8 来解决.0 和 tensorflow 版本 2.0.0.
所以基本上卸载 tensorflowprotobuf 并重新安装 pip3 install protobuf==3.8.0pip3 install tensorflow==2.0.0.

I am trying to run tensorboard: tensorboard --logdir=runs.
I have also tried: tensorboard --logdir=runs --host=127.0.0.1.
I am running the command from the terminal from within the the directory, which contains the runs folder.

I get the following error:

[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1367] 
CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: 
CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
Abort trap: 6

My Python code contains the following lines:

tb_path = './runs/SimpleLSTM_MNIST'
if os.path.isdir(tb_path):
    shutil.rmtree(tb_path)

writer = tb.SummaryWriter(log_dir=tb_path)

My runs folder contains the folder SimpleLSTM_MNIST, which contains events.out.tfevents.1591953948.computername.local.29440.0.

Operating System: MacOS Catalina

How can I resolve the problem?

解决方案

Apparently this is a specific issue that occurs when running macOS Catalina, and can be solved by switching to protobuf version 3.8.0 and tensorflow version 2.0.0.
So basically uninstalling tensorflow and protobuf and re-installing with pip3 install protobuf==3.8.0 and pip3 install tensorflow==2.0.0.

这篇关于tensorboard --logdir=runs 不工作:中止陷阱:6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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