Coder Social home page Coder Social logo

Comments (7)

qfgaohao avatar qfgaohao commented on July 23, 2024

hi @kamauz , the priors/anchors needed in your model and the way of branching out paths to detection head might be different.

from pytorch-ssd.

notabigfish avatar notabigfish commented on July 23, 2024

@kamauz Hi, do you find the solution? I also changed the network structure and faced the same problem as yours.

from pytorch-ssd.

notabigfish avatar notabigfish commented on July 23, 2024

@qfgaohao Hi, in this situation, should I change the parameters of SSDSpec in the config file? Thank you!

from pytorch-ssd.

kamauz avatar kamauz commented on July 23, 2024

@qfgaohao I ve abandoned this repository time ago for this problem. I remember that I tried to change SSDSpec but I couldn't make it work. I don't exclude that the solution was there by the way. It is tricky maybe

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024

@kamauz @notabigfish you can also change the number of channels of extra layers to make the network output is consistent with the generated anchors.

from pytorch-ssd.

notabigfish avatar notabigfish commented on July 23, 2024

Thank you for the answers!! Actually, similar to @kamauz , I delete all the BatchNorm layers after Pointwise Conv layer and got location with size [..., 1434] but priors with size [..., 3000]. The reason is that the first feature map size in vision/ssd/ssd.py line 58 is [1, 576, 10, 10], but it should be [1, 576, 19, 19]. So I changed line 14 in vision/ssd/config/mobilenetv1_ssd_config.py to

SSDSpec(10, 16, SSDBoxSizes(60, 105), [2, 3])

Then the error that @kamauz mentioned is fixed. However, a new error shows up:

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimention 1. Got 41 and 47 in dimension 0 at /pytorch/aten/src/TH/generic/THTensor.cpp:711

It turns out after changing the configuration, some labels got size torch.Size([0]).

I did not change any convolution layer but only deleted the batchnorm layer. So in theory the output channels are unchanged, right? Or maybe I miss something? Thank you!! @qfgaohao

from pytorch-ssd.

kamauz avatar kamauz commented on July 23, 2024

@notabigfish Are you trying in the same situation that I tried? So with the PTH file got from a conversion of the official tensorflow model?
By the way months ago I assumed that maybe Google developers experimented a different version with respect to the official SSD paper. I don't know if removing the BatchNorm could be a good idea. Maybe it's a matter of implemented choices that we can't know unless we can see how they actually trained the network. Keep me updated if you find a solution

from pytorch-ssd.

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.