Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于deep-sort yolov3的运行错误 #1

Open
AIrobot6 opened this issue Sep 26, 2018 · 10 comments
Open

关于deep-sort yolov3的运行错误 #1

AIrobot6 opened this issue Sep 26, 2018 · 10 comments

Comments

@AIrobot6
Copy link

你好 看到您的关于deep-sort yolov3的文章,下载下来不能正常运行显示报错,Windows 下
Input to reshape is a tensor with 3549 values, but the requested shape requires a multiple of 43095
[[Node:Reshape_75=Reshape[T=DT_FLOAT,Tshape=DT_INT32,_device="/job:localhost/replica:0/task:0/device:CPU:0"](conv2d_59_4/BiasAdd, Reshape_75/shape)]]
一直没有找到问题的根源 特别写了这封邮件 寻求您的帮助,希望您给一些详细的使用教程 期待您的回复。 谢谢

@lyp-deeplearning
Copy link
Owner

lyp-deeplearning commented Sep 26, 2018

@AIrobot6 Thanks for your question. If you run at the windows platform, i think you can check your tensorflow version firstly. Because keras uses the tensorflow as the back.
1、pip show tensorflow
2、you can use command :pip install --upgrade tensorflow
And if your version is 1.10.0 for tensorflow-CPU, the code can run but the speed is a little slow

@AIrobot6
Copy link
Author

@AIrobot6 Thanks for your question. If you run at the windows platform, i think you can check your tensorflow version firstly. Because keras uses the tensorflow as the back.
1、pip show tensorflow
2、you can use command :pip install --upgrade tensorflow
And if your version is 1.10.0 for tensorflow-CPU, the code can run but the speed is a little slow

你好 ,我的是您说的那个版本,错误依然没有解决?

@lyp-deeplearning
Copy link
Owner

@AIrobot6 你在更新完tensorflow版本后,有没有重新下载keras,还有你运行的是摄像头还是视频

@lyp-deeplearning
Copy link
Owner

@AIrobot6 之前有人也是遇到你这个问题,更新完tensorflow的版本问题就解决了

@lyp-deeplearning
Copy link
Owner

@AIrobot6 https://blog.csdn.net/liuxiao214/article/details/78241193
建议你运行的时候定位下是哪一行出了错,这个版本的原版是在https://github.com/Qidian213/deep_sort_yolov3,你可以在它那里查查

@AIrobot6
Copy link
Author

@ AIrobot6你在更新完tensorflow版本后,有没有重新下载keras,还有你运行的是摄像头还是视频

视频 摄像头都是这个错误,这是全部的报错。对于这个错误不知道从哪里下手。已经更新和重新下载
InvalidArgumentError: Input to reshape is a tensor with 3549 values, but the requested shape requires a multiple of 43095
[[Node: Reshape_3 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](conv2d_59/BiasAdd, Reshape_3/shape)]]

Caused by op 'Reshape_3', defined at:
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 16, in
app.launch_new_instance()
File "C:\ProgramData\Anaconda3\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 486, in start
self.io_loop.start()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\platform\asyncio.py", line 127, in start
self.asyncio_loop.run_forever()
File "C:\ProgramData\Anaconda3\lib\asyncio\base_events.py", line 422, in run_forever
self._run_once()
File "C:\ProgramData\Anaconda3\lib\asyncio\base_events.py", line 1432, in _run_once
handle._run()
File "C:\ProgramData\Anaconda3\lib\asyncio\events.py", line 145, in _run
self._callback(*self._args)
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\platform\asyncio.py", line 117, in _handle_events
handler_func(fileobj, events)
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 233, in dispatch_shell
handler(stream, idents, msg)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 399, in execute_request
user_expressions, allow_stdin)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\ipkernel.py", line 208, in do_execute
res = shell.run_cell(code, store_history=store_history, silent=silent)
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\zmqshell.py", line 537, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2662, in run_cell
raw_cell, store_history, silent, shell_futures)
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2785, in _run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2903, in run_ast_nodes
if self.run_code(code, result):
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 116, in
main(YOLO())
File "C:\Users\Administrator\Desktop\66666\新建文件夹\deep_sort_yolov3-master\yolo.py", line 33, in init
self.boxes, self.scores, self.classes = self.generate()
File "C:\Users\Administrator\Desktop\66666\新建文件夹\deep_sort_yolov3-master\yolo.py", line 72, in generate
score_threshold=self.score, iou_threshold=self.iou)
File "C:\Users\Administrator\Desktop\66666\新建文件夹\deep_sort_yolov3-master\yolo3\model.py", line 170, in yolo_eval
anchors[anchor_mask[l]], num_classes, input_shape, image_shape)
File "C:\Users\Administrator\Desktop\66666\新建文件夹\deep_sort_yolov3-master\yolo3\model.py", line 148, in yolo_boxes_and_scores
anchors, num_classes, input_shape)
File "C:\Users\Administrator\Desktop\66666\新建文件夹\deep_sort_yolov3-master\yolo3\model.py", line 105, in yolo_head
feats, [-1, grid_shape[0], grid_shape[1], num_anchors, num_classes + 5])
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 1947, in reshape
return tf.reshape(x, shape)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6198, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3155, in create_op
op_def=op_def)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 3549 values, but the requested shape requires a multiple of 43095
[[Node: Reshape_3 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](conv2d_59/BiasAdd, Reshape_3/shape)]]

@lyp-deeplearning
Copy link
Owner

应该还需要安装skelearn,opencv的依赖库,我是直接用纯python里面的pip安装的python以及各种库,我不知道是否有可能是因为你使用的是anaconda造成的这种原因

@AIrobot6
Copy link
Author

应该还需要安装skelearn,opencv的依赖库,我是直接用纯python里面的pip安装的python以及各种库,我不知道是否有可能是因为你使用的是anaconda造成的这种原因

请问是sklean 还是sklearn??

@lyp-deeplearning
Copy link
Owner

https://github.com/Qidian213/deep_sort_yolov3, 你去这个项目里看看具体的需要什么,你看看按照原版你能使用吗

@AIrobot6
Copy link
Author

https://github.com/Qidian213/deep_sort_yolov3, 你去这个项目里看看具体的需要什么,你看看按照原版你能使用吗

原版也是会出现这种错误,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants