Coder Social home page Coder Social logo

Comments (3)

GeorgeTsio avatar GeorgeTsio commented on May 24, 2024

Did you manage to run this inference? python models.py <num_classes> <IN_IMAGE_H> <IN_IMAGE_W> <namefile(optional)>

from pytorch-yolov4.

1-etudiant avatar 1-etudiant commented on May 24, 2024

Did you manage to run this inference? python models.py <num_classes> <IN_IMAGE_H> <IN_IMAGE_W> <namefile(optional)>

no,i want to train my model using images with size of 1920*1080,i changed my cfg.py,and the content that has been altered is:"Cfg.batch = 16,Cfg.width = 1920,Cfg.height = 1080".but it output error:
Traceback (most recent call last):
File "train.py", line 626, in
train(model=model,
File "train.py", line 379, in train
bboxes_pred = model(images)
File "/home/sh/miniconda3/envs/yolov5/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sh/pytorch-YOLOv4/tool/darknet2pytorch.py", line 179, in forward
x = torch.cat((x1, x2), 1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 135 but got size 136 for tensor number 1 in the list.

from pytorch-yolov4.

GeorgeTsio avatar GeorgeTsio commented on May 24, 2024

Did you manage to run this inference? python models.py <num_classes> <IN_IMAGE_H> <IN_IMAGE_W> <namefile(optional)>

no,i want to train my model using images with size of 1920*1080,i changed my cfg.py,and the content that has been altered is:"Cfg.batch = 16,Cfg.width = 1920,Cfg.height = 1080".but it output error: Traceback (most recent call last): File "train.py", line 626, in train(model=model, File "train.py", line 379, in train bboxes_pred = model(images) File "/home/sh/miniconda3/envs/yolov5/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/home/sh/pytorch-YOLOv4/tool/darknet2pytorch.py", line 179, in forward x = torch.cat((x1, x2), 1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 135 but got size 136 for tensor number 1 in the list.

Please try to run first the recommended inferences with his examples to see if there are any mistakes in his model (because I found some, especially in yolov4.pth), then try your training

from pytorch-yolov4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.