tensorflow运行SegNet问题

palizhen22hao 2017-11-06 11:55:43
使用下面的segnet实现代码
https://github.com/tkuanlun350/Tensorflow-SegNet
在main中已经修改了camvid数据集里面三个txt文件的数据路径,但是报错
The model is set to Training
Max training Iteration: 20000
Initial lr: 0.001000
CamVid Image dir: /home/jiang/lane/SegNet/CamVid/train.txt
CamVid Val dir: /home/jiang/lane/SegNet/CamVid/val.txt
Batch Size: 1
Log dir: /tmp3/first350/TensorFlow/Logs
Filling queue with 146 CamVid images before starting to train. This will take a few minutes.
Filling queue with 146 CamVid images before starting to train. This will take a few minutes.
2017-11-06 23:39:54.802996: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Traceback (most recent call last):
File "/home/jiang/lane/Tensorflow-SegNet-master/main.py", line 52, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/jiang/lane/Tensorflow-SegNet-master/main.py", line 49, in main
model.training(FLAGS, is_finetune=False)
File "/home/jiang/lane/Tensorflow-SegNet-master/model.py", line 389, in training
sess.run(init)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'MaxPoolWithArgmax' with these attrs. Registered devices: [CPU], Registered kernels:
<no registered kernels>

[[Node: pool1 = MaxPoolWithArgmax[T=DT_FLOAT, Targmax=DT_INT64, ksize=[1, 2, 2, 1], padding="SAME", strides=[1, 2, 2, 1]](conv1/Relu)]]

Caused by op u'pool1', defined at:
File "/home/jiang/lane/Tensorflow-SegNet-master/main.py", line 52, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/jiang/lane/Tensorflow-SegNet-master/main.py", line 49, in main
model.training(FLAGS, is_finetune=False)
File "/home/jiang/lane/Tensorflow-SegNet-master/model.py", line 372, in training
loss, eval_prediction = inference(train_data_node, train_labels_node, batch_size, phase_train)
File "/home/jiang/lane/Tensorflow-SegNet-master/model.py", line 182, in inference
padding='SAME', name='pool1')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_nn_ops.py", line 3525, in max_pool_with_argmax
padding=padding, Targmax=Targmax, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1470, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'MaxPoolWithArgmax' with these attrs. Registered devices: [CPU], Registered kernels:
<no registered kernels>

[[Node: pool1 = MaxPoolWithArgmax[T=DT_FLOAT, Targmax=DT_INT64, ksize=[1, 2, 2, 1], padding="SAME", strides=[1, 2, 2, 1]](conv1/Relu)]]

不知道怎么回事 查半天也没查出来
...全文
1375 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_44011046 2020-10-11
  • 打赏
  • 举报
回复
楼组找见咋解决了嘛
Vivian_345 2019-11-22
  • 打赏
  • 举报
回复
Instructions for updating: Colocations handled automatically by placer. 想问一下 这个问题怎么解决~
weixin_43470529 2019-07-23
  • 打赏
  • 举报
回复
runfile('C:/Users/dell/Desktop/Tensorflow-SegNet-master/main.py', wdir='C:/Users/dell/Desktop/Tensorflow-SegNet-master')
The model is set to Training
Max training Iteration: 20000
Initial lr: 0.001000
CamVid Image dir: C:/Users/dell/Desktop/Tensorflow-SegNet-master/CamVid/train.txt
CamVid Val dir: C:/Users/dell/Desktop/Tensorflow-SegNet-master/CamVid/val.txt
Batch Size: 5
Log dir: C:/Users/dell/Desktop/Tensorflow-SegNet-master/CamVid/Logs
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From C:\Users\dell\Desktop\Tensorflow-SegNet-master\Inputs.py:107: slice_input_producer (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
Instructions for updating:
Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.from_tensor_slices(tuple(tensor_list)).shuffle(tf.shape(input_tensor, out_type=tf.int64)[0]).repeat(num_epochs)`. If `shuffle=False`, omit the `.shuffle(...)`.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py:374: range_input_producer (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
Instructions for updating:
Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.range(limit).shuffle(limit).repeat(num_epochs)`. If `shuffle=False`, omit the `.shuffle(...)`.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py:320: input_producer (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
Instructions for updating:
Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.from_tensor_slices(input_tensor).shuffle(tf.shape(input_tensor, out_type=tf.int64)[0]).repeat(num_epochs)`. If `shuffle=False`, omit the `.shuffle(...)`.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py:190: limit_epochs (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
Instructions for updating:
Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.from_tensors(tensor).repeat(num_epochs)`.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py:199: QueueRunner.__init__ (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py:199: add_queue_runner (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\training\input.py:202: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Filling queue with 146 CamVid images before starting to train. This will take a few minutes.
WARNING:tensorflow:From C:\Users\dell\Desktop\Tensorflow-SegNet-master\Inputs.py:44: shuffle_batch (from tensorflow.python.training.input) is deprecated and will be removed in a future version.
Instructions for updating:
Queue-based input pipelines have been replaced by `tf.data`. Use `tf.data.Dataset.shuffle(min_after_dequeue).batch(batch_size)`.
Filling queue with 146 CamVid images before starting to train. This will take a few minutes.

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

INFO:tensorflow:Summary name conv_classifier/weight_loss (raw) is illegal; using conv_classifier/weight_loss__raw_ instead.
INFO:tensorflow:Summary name loss/cross_entropy (raw) is illegal; using loss/cross_entropy__raw_ instead.
INFO:tensorflow:Summary name loss/total_loss (raw) is illegal; using loss/total_loss__raw_ instead.
WARNING:tensorflow:From C:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\ops\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From C:\Users\dell\Desktop\Tensorflow-SegNet-master\model.py:393: start_queue_runners (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
青玉白露 2019-04-08
  • 打赏
  • 举报
回复
之前几天一直在解决这个问题: 新建一个环境,python=3.6 安装tensorflow版本指定为1.11。 注意Util.py文件的cpu还是gpu
ylh1234 2017-12-08
  • 打赏
  • 举报
回复
你现在会了吗?。。
千殇_不哭 2017-11-20
  • 打赏
  • 举报
回复
MaxPoolWithArgmax这个使用theano实现的 我不知道你这版tf实现的是什么情况,我用keras,后台使用theano调的成功了 但是效果不太行,可以讨论下
palizhen22hao 2017-11-07
  • 打赏
  • 举报
回复
求大神指导啊
palizhen22hao 2017-11-07
  • 打赏
  • 举报
回复
基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 基于tensorflow2.5实现的segnet图像分割算法python源码+数据集.zip 【资源说明】 1、该资源内项目代码都是经过测试运行成功,功能正常的情况下才上传的,请放心下载使用。 2、适用人群:主要针对计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、数学、电子信息等)的同学或企业员工下载使用,具有较高的学习借鉴价值。 3、不仅适合小白学习实战练习,也可作为大作业、课程设计、毕设项目、初期项目立项演示等,欢迎下载,互相学习,共同进步!

37,720

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧