Tensorflow r0.11的tf.gfile.Glob()错误

2024-03-09 16:58

本文主要是介绍Tensorflow r0.11的tf.gfile.Glob()错误,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

在测试 Tensorflow 时遇到问题:

通过 TF-slim 模块进行测试,使用 TFRecords 格式的数据集,训练脚本如下:

pythontrain_image_classifier.py --dataset_dir=/home/docker/imagenet_tfrecords/imagenet_tfrecords/train--dataset_name=imagenet_224 --dataset_split_name=train--model_name=inception_v1 --num_clones=1 --batch_size=128 --learning_rate=0.01--max_number_of_steps=200 --num_readers=2 --num_preprocessing_threads=16--preprocessing_name=lenet

出现了 ***Error in `python': munmap_chunk(): invalid pointer: 0x00007f2a50512760 *** 的错误,具体的 Backtrace 最后附 。

 

经查找后是程序在并行读取文件时出错  data_files =gfile.Glob(data_sources)

/lib/python2.7/site-packages/tensorflow/contrib/slim/python/slim/data/parallel_reader.py

if '*' indata_sources or '?' in data_sources or '[' in data_sources:data_files =gfile.Glob(data_sources)

原因

此问题是由TF不同版本的Python API差异性导致的。Tensorflow r0.11未支持tf.gfile.Glob()



Backtrace :

*** Error in `python': munmap_chunk(): invalid pointer: 0x00007f07b775a760 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7bc67)[0x7f07b6a71c67]
/lib64/ld-linux-x86-64.so.2(_dl_deallocate_tls+0x39)[0x7f07b7ab3fe9]
/lib64/libpthread.so.0(+0x6e07)[0x7f07b74c6e07]
/lib64/libpthread.so.0(+0x6f1f)[0x7f07b74c6f1f]
/lib64/libpthread.so.0(pthread_join+0xe3)[0x7f07b74c8f63]
/lib64/libstdc++.so.6(_ZNSt6thread4joinEv+0x27)[0x7f07001be1f7]
/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so(+0x272d560)[0x7f0709aaf560]
/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so(_ZN10tensorflow6thread10ThreadPool4ImplD0Ev+0xd3)[0x7f0709a83383]
/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so(_ZN10tensorflow10FileSystem16GetMatchingPathsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIS6_SaIS6_EE+0x6f4)[0x7f0709aab6e4]
/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so(_ZN10tensorflow3Env16GetMatchingPathsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorIS6_SaIS6_EE+0xeb)[0x7f0709aa688b]
/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so(+0x9cbf1b)[0x7f0707d4df1b]
/home/docker/tensorflow-0.11/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so(+0x9cf4c2)[0x7f0707d514c2]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4594)[0x7f07b77bcb94]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[0x7f07b77bc85f]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[0x7f07b77bc85f]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[0x7f07b77bc85f]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(+0x6f18d)[0x7f07b774b18d]
/lib64/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f07b7726073]
/lib64/libpython2.7.so.1.0(+0x59085)[0x7f07b7735085]
/lib64/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f07b7726073]
/lib64/libpython2.7.so.1.0(+0xa1167)[0x7f07b777d167]
/lib64/libpython2.7.so.1.0(+0x9fe7f)[0x7f07b777be7f]
/lib64/libpython2.7.so.1.0(PyObject_Call+0x43)[0x7f07b7726073]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x1d4c)[0x7f07b77ba34c]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[0x7f07b77bc85f]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x425f)[0x7f07b77bc85f]
/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7f07b77be1ad]
/lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7f07b77be2b2]
/lib64/libpython2.7.so.1.0(+0xfb6ef)[0x7f07b77d76ef]
/lib64/libpython2.7.so.1.0(PyRun_FileExFlags+0x7e)[0x7f07b77d88ae]
/lib64/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xe9)[0x7f07b77d9b39]
/lib64/libpython2.7.so.1.0(Py_Main+0xc9f)[0x7f07b77eab3f]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f07b6a17af5]
python[0x400721]
======= Memory map: ========
00400000-00401000 r-xp 00000000 00:24 144475053                          /home/docker/tensorflow-0.11/bin/python
00600000-00601000 r--p 00000000 00:24 144475053                          /home/docker/tensorflow-0.11/bin/python
00601000-00602000 rw-p 00001000 00:24 144475053                          /home/docker/tensorflow-0.11/bin/python
024dd000-05a40000 rw-p 00000000 00:00 0                                  [heap]
7f06d0000000-7f06d0021000 rw-p 00000000 00:00 0
7f06d0021000-7f06d4000000 ---p 00000000 00:00 0
7f06d8000000-7f06d8021000 rw-p 00000000 00:00 0
7f06d8021000-7f06dc000000 ---p 00000000 00:00 0
7f06dc000000-7f06dc021000 rw-p 00000000 00:00 0
7f06dc021000-7f06e0000000 ---p 00000000 00:00 0
7f06e0000000-7f06e0021000 rw-p 00000000 00:00 0
7f06e0021000-7f06e4000000 ---p 00000000 00:00 0
7f06e8000000-7f06e8021000 rw-p 00000000 00:00 0
7f06e8021000-7f06ec000000 ---p 00000000 00:00 0
7f06ec000000-7f06ec021000 rw-p 00000000 00:00 0
7f06ec021000-7f06f0000000 ---p 00000000 00:00 0
7f06f0000000-7f06f0021000 rw-p 00000000 00:00 0
7f06f0021000-7f06f4000000 ---p 00000000 00:00 0
7f06f8000000-7f06f8021000 rw-p 00000000 00:00 0
7f06f8021000-7f06fc000000 ---p 00000000 00:00 0
7f06ff6c9000-7f06ff6d2000 r-xp 00000000 08:03 1074458532                 /usr/lib64/python2.7/lib-dynload/arraymodule.so
7f06ff6d2000-7f06ff8d1000 ---p 00009000 08:03 1074458532                 /usr/lib64/python2.7/lib-dynload/arraymodule.so
7f06ff8d1000-7f06ff8d2000 r--p 00008000 08:03 1074458532                 /usr/lib64/python2.7/lib-dynload/arraymodule.so
7f06ff8d2000-7f06ff8d4000 rw-p 00009000 08:03 1074458532                 /usr/lib64/python2.7/lib-dynload/arraymodule.so
7f06ff8d4000-7f06ff8dc000 r-xp 00000000 08:03 1074458522                 /usr/lib64/python2.7/lib-dynload/_json.so
7f06ff8dc000-7f06ffadb000 ---p 00008000 08:03 1074458522                 /usr/lib64/python2.7/lib-dynload/_json.so
7f06ffadb000-7f06ffadc000 r--p 00007000 08:03 1074458522                 /usr/lib64/python2.7/lib-dynload/_json.so
7f06ffadc000-7f06ffadd000 rw-p 00008000 08:03 1074458522                 /usr/lib64/python2.7/lib-dynload/_json.so
7f06ffadd000-7f06ffae8000 r-xp 00000000 08:03 1074458554                 /usr/lib64/python2.7/lib-dynload/parsermodule.so
7f06ffae8000-7f06ffce7000 ---p 0000b000 08:03 1074458554                 /usr/lib64/python2.7/lib-dynload/parsermodule.so
7f06ffce7000-7f06ffce8000 r--p 0000a000 08:03 1074458554                 /usr/lib64/python2.7/lib-dynload/parsermodule.so
7f06ffce8000-7f06ffce9000 rw-p 0000b000 08:03 1074458554                 /usr/lib64/python2.7/lib-dynload/parsermodule.so
7f06ffce9000-7f06ffced000 r-xp 00000000 08:03 1074458599                 /usr/lib64/python2.7/lib-dynload/zlibmodule.so
7f06ffced000-7f06ffeec000 ---p 00004000 08:03 1074458599                 /usr/lib64/python2.7/lib-dynload/zlibmodule.so
7f06ffeec000-7f06ffeed000 r--p 00003000 08:03 1074458599                 /usr/lib64/python2.7/lib-dynload/zlibmodule.so
7f06ffeed000-7f06ffeef000 rw-p 00004000 08:03 1074458599                 /usr/lib64/python2.7/lib-dynload/zlibmodule.so
7f06ffeef000-7f06fff04000 r-xp 00000000 08:03 2149358536                 /usr/lib64/libgcc_s-4.8.3-20140911.so.1
7f06fff04000-7f0700103000 ---p 00015000 08:03 2149358536                 /usr/lib64/libgcc_s-4.8.3-20140911.so.1
7f0700103000-7f0700104000 r--p 00014000 08:03 2149358536                 /usr/lib64/libgcc_s-4.8.3-20140911.so.1
7f0700104000-7f0700105000 rw-p 00015000 08:03 2149358536                 /usr/lib64/libgcc_s-4.8.3-20140911.so.1
7f0700105000-7f0700276000 r-xp 00000000 08:03 2156207962                 /usr/lib64/libstdc++.so.6
7f0700276000-7f0700476000 ---p 00171000 08:03 2156207962                 /usr/lib64/libstdc++.so.6
7f0700476000-7f0700480000 r--p 00171000 08:03 2156207962                 /usr/lib64/libstdc++.so.6
7f0700480000-7f0700482000 rw-p 0017b000 08:03 2156207962                 /usr/lib64/libstdc++.so.6
7f0700482000-7f0700486000 rw-p 00000000 00:00 0
7f0700486000-7f07005ef000 r-xp 00000000 00:24 165905089                  /home/docker/tensorflow-0.11/lib/python2.7/site-packages/_solib_k8/_U_S_Sthird_Uparty_Smkl_Cintel_Ubinary_Ublob___Uthird_Uparty_Smkl/libiomp5.so
7f07005ef000-7f07007ef000 ---p 00169000 00:24 165905089                  /home/docker/tensorflow-0.11/lib/python2.7/site-packages/_solib_k8/_U_S_Sthird_Uparty_Smkl_Cintel_Ubinary_Ublob___Uthird_Uparty_Smkl/libiomp5.so
7f07007ef000-7f07007fa000 rw-p 00169000 00:24 165905089                  /home/docker/tensorflow-0.11/lib/python2.7/site-packages/_solib_k8

这篇关于Tensorflow r0.11的tf.gfile.Glob()错误的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/791313

相关文章

【经验交流】修复系统事件查看器启动不能时出现的4201错误

方法1,取得『%SystemRoot%\LogFiles』文件夹和『%SystemRoot%\System32\wbem』文件夹的权限(包括这两个文件夹的所有子文件夹的权限),简单点说,就是使你当前的帐户拥有这两个文件夹以及它们的子文件夹的绝对控制权限。这是最简单的方法,不少老外说,这样一弄,倒是解决了问题。不过对我的系统,没用; 方法2,以不带网络的安全模式启动,运行命令行,输入“ne

SQL2005 性能监视器计数器错误解决方法

【系统环境】 windows 2003 +sql2005 【问题状况】 用户在不正当删除SQL2005后会造成SQL2005 性能监视器计数器错误,如下图 【解决办法】 1、在 “开始” --> “运行”中输入 regedit,开启注册表编辑器,定位到 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVer

ssm 之事务管理出现错误

JDBC Connection will not be managed by Spring 项目采用的是分布式架构,分别有controller,service,solr三个服务器,之间通过dubbo进行调用,经过测试发现事务配置完以后不能通过spring进行管理,其中两条insert和一条update语句都执行完毕,异常并没有使得事务进行回滚,通过调取debug日志发现“JDBC Conn

Unstructured cannot write mode RGBA as JPEG 错误解决

Unstructured cannot write mode RGBA as JPEG 错误解决 0. 错误详细1. 解决方法 0. 错误详细 Image Extraction Error: Skipping the failed imageTraceback (most recent call last):File "/root/miniconda3/envs/learn-y

收藏:解决 pip install 出现 error: subprocess-exited-with-error 错误的方法

在使用 pip 安装 Python 包时,有时候会遇到 error: subprocess-exited-with-error 错误。这种错误通常是由于 setuptools 版本问题引起的。本文将介绍如何解决这一问题 当你使用 pip install 安装某个 Python 包时,如果 setuptools 版本过高或过低,可能会导致安装过程出错,并出现类似以下错误信息:error: subpr

插件:清理maven错误缓存.bat

插件:https://pan.baidu.com/s/1nHIxHoo1C4MvFlW7QbZe5Q?pwd=7zenhttps://pan.baidu.com/s/1nHIxHoo1C4MvFlW7QbZe5Q?pwd=7zen没错误缓存时: 有错误缓存时:

win10不用anaconda安装tensorflow-cpu并导入pycharm

记录一下防止忘了 一、前提:已经安装了python3.6.4,想用tensorflow的包 二、在pycharm中File-Settings-Project Interpreter点“+”号导入很慢,所以直接在cmd中使用 pip install -i https://mirrors.aliyun.com/pypi/simple tensorflow-cpu下载好,默认下载的tensorflow

在幼儿园管理系统中,会议管理申请会议模块:添加会议记录(提交表单)的时候报:404错误!

在幼儿园管理系统(spring MVC)中,会议管理>申请会议模块:添加会议记录的时候报:404错误!不知道为啥找不到,一开始感觉一头雾水,怎么会出现404页面找不到错误那,又检查action,controller等这也没错啊!怎么出现404错误那。经过询问和查找,终于找到原因了。 原因是:添加的有时间字段。 代码: @InitBinder public void in

稀疏自编码器tensorflow

自编码器是一种无监督机器学习算法,通过计算自编码的输出与原输入的误差,不断调节自编码器的参数,最终训练出模型。自编码器可以用于压缩输入信息,提取有用的输入特征。如,[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]四比特信息可以压缩成两位,[0,0],[1,0],[1,1],[0,1]。此时,自编码器的中间层的神经元个数为2。但是,有时中间隐藏层的神经元

Tensorflow实现与门感知机

感知机是最简单的神经网络,通过输入,进行加权处理,经过刺激函数,得到输出。通过输出计算误差,调整权重,最终,得到合适的加权函数。 今天,我通过tensorflow实现简单的感知机。 首先,初始化变量:     num_nodes = 2     output_units = 1     w = tf.Variable(tf.truncated_normal([num_nodes,output