无法连接到X服务器GOOGLE COLAB [英] Cannot connect to X server GOOGLE COLAB

查看:948
本文介绍了无法连接到X服务器GOOGLE COLAB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Google COLAB 上的 Tensorflow对象检测API 进行预测.我已经成功完成了培训过程和导出推断图任务.

I am trying to make a prediction using Tensorflow Object Detection API on Google COLAB. Already I successfully completed the training process and Export Inference Graph task.

但是问题是,当我要做出新的预测时,它会抛出一些错误日志.

But Problem is when I am going to make a new prediction it's throwing some error log.

无法连接到X服务器

cannot connect to X server

现在我无法做出新的预测.我的错误日志的某些部分:

Now I am unable to make a new prediction. Some portion of my error log:

totalMemory: 11.17GiB freeMemory: 6.65GiB
2019-02-07 15:08:38.398219: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-02-07 15:08:38.745889: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-02-07 15:08:38.745955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-02-07 15:08:38.745975: I 
tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N
2019-02-07 15:08:38.746201: W 
tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:42] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.
2019-02-07 15:08:38.746259: I 
tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6426 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7)
2019-02-07 15:08:39.683618: W ./tensorflow/core/grappler/optimizers/graph_optimizer_stage.h:241] Failed to run optimizer ArithmeticOptimizer, stage RemoveStackStridedSliceSameAxis node Preprocessor/map/while/ResizeToRange/strided_slice_3. Error: Pack node (Preprocessor/map/while/ResizeToRange/stack_2) axis attribute is out of bounds: 0
2019-02-07 15:08:40.360560: W ./tensorflow/core/grappler/optimizers/graph_optimizer_stage.h:241] Failed to run optimizer ArithmeticOptimizer, stage RemoveStackStridedSliceSameAxis node Preprocessor/map/while/ResizeToRange/strided_slice_3. Error: Pack node (Preprocessor/map/while/ResizeToRange/stack_2) axis attribute is out of bounds: 0
2019-02-07 15:08:40.646093: I tensorflow/stream_executor/dso_loader.cc:152] successfully opened CUDA library libcublas.so.10.0 locally
: cannot connect to X server 

我如何找出出现此问题的原因?

How can I figure out the reason for this problem?

推荐答案

X服务器是X Window系统中的程序,它在本地计算机(即用户直接使用的计算机)上运行,并处理对图形卡的所有访问,在这些计算机上显示屏幕和输入设备(通常是键盘和鼠标).

An X server is a program in the X Window System that runs on local machines (i.e. the computers used directly by users) and handles all access to the graphics cards, display screens and input devices (typically a keyboard and mouse) on those computers.

这样说,Colab作为服务器中的终端实例运行,如果您使用的是GPU运行时,则问题不在于X服务器访问图形卡,也不与输入设备有关,通常是在您尝试解析某些图形卡时发生的应该在桌面上显示为单独窗口的数据(如cv2.imshow()之类的命令),可能会有其他类似的函数会导致此问题,如果必须使用图形输出,则可能需要查看%matplotlib notebook并显示数据在可交互的matplot图中.

With that said Colab runs as a terminal instance in the server, if you are using GPU runtime, then the problem is not with X server accessing your Graphics card, neither with Input devices, generally this occurs when you try to parse some data that should be displayed as separate window on your desktop, commands like cv2.imshow(), there can be other similar functions that can cause this problem, if you have to use graphical ouput you might want to look into %matplotlib notebook and displaying the data in the interactable matplot plots.

如果这不是您的问题,只需发布​​指向您修改后的代码的链接,我可能会为您提供更多帮助.

If this is not your issue, just post a link to your modified code and I might be able to help more.

这篇关于无法连接到X服务器GOOGLE COLAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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