positive666 / yolo_research

based on yolo-high-level project (detect\pose\classify\segment\):include yolov5\yolov7\yolov8\ core ,improvement research ,SwintransformV2 and Attention Series. training skills, business customization, engineering deployment C
GNU General Public License v3.0
756 stars 146 forks source link

YOLOv7训练问题 #87

Closed Someone1Wu closed 1 year ago

Someone1Wu commented 1 year ago

使用coco128数据集直接训练,会报错:default message here: requirements: gitpython not found, check failed. 把train.py 中的GIT_INFO=check_git_info() 和 'git':GIT_INFO, 注释掉后可以进入训练阶段,但是训练完一个epoch的val阶段会直接报错:TypeError: _make_grid() takes from 0 to 2 positional arguments but 3 were given 这个什么原因呀,求助大佬指点一下。

Someone1Wu commented 1 year ago

完整的报错信息: Traceback (most recent call last): File "E:\Research\yolov5_research-master\yolov5_research-master\train.py", line 641, in main(opt) File "E:\Research\yolov5_research-master\yolov5_research-master\train.py", line 535, in main train(opt.hyp, opt, device, callbacks) File "E:\Research\yolov5_research-master\yolov5research-master\train.py", line 354, in train results, maps, = validate.run(data_dict, File "D:\Users\cayce\anaconda3\envs\pytorch\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, kwargs) File "E:\Research\yolov5_research-master\yolov5_research-master\val.py", line 211, in run preds, train_out = model(im) if compute_loss else (model(im, augment=augment), None) File "D:\Users\cayce\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, *kwargs) File "E:\Research\yolov5_research-master\yolov5_research-master\models\yolo.py", line 1088, in forward return self._forward_once(x, profile, visualize) # single-scale inference, train File "E:\Research\yolov5_research-master\yolov5_research-master\models\yolo.py", line 943, in _forward_once x = m(x) # run File "D:\Users\cayce\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(input, kwargs) File "E:\Research\yolov5_research-master\yolov5_research-master\models\yolo.py", line 270, in forward self.grid[i], self.anchor_grid[i] = self._make_grid(nx, ny, i) TypeError: _make_grid() takes from 0 to 2 positional arguments but 3 were given

positive666 commented 1 year ago

收到 不过我要晚些 才能测试调试

Someone1Wu commented 1 year ago

收到 不过我要晚些 才能测试调试

好的,谢谢大佬!

positive666 commented 1 year ago

收到 不过我要晚些 才能测试调试

好的,谢谢大佬!

你好,我今天有时间 我看了下问题就是函数定义问题,这里是我融入了代码整合的问题,所以我按照V7的函数定义先修正了,BUG是没有了 近期我在做数字孪生的交叉业务比较忙 我后续会更新V8的核心代码 谢谢你的反馈

positive666 commented 1 year ago

还有那个CHECK的信息其实不影响你使用的 你不用管就行了 它异常就返回空 

Someone1Wu commented 1 year ago

还有那个CHECK的信息其实不影响你使用的 你不用管就行了 它异常就返回空

好的,谢谢!