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

self.variance = cfg['variance'] #15

Open
pjg205 opened this issue May 30, 2021 · 0 comments
Open

self.variance = cfg['variance'] #15

pjg205 opened this issue May 30, 2021 · 0 comments

Comments

@pjg205
Copy link

pjg205 commented May 30, 2021

Hi, I run this code with my custom dataset. I add this(from data.config import custom_voc as cfg) on the top of eval.py and detection.py. However, it didn't work. Is there any clue to solve this error?

VGG base: [Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False), Conv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False), Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=True), Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False), Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)), ReLU(inplace=True), MaxPool2d(kernel_size=3, stride=1, padding=1, dilation=1, ceil_mode=False), Conv2d(512, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(6, 6), dilation=(6, 6)), ReLU(inplace=True), Conv2d(1024, 1024, kernel_size=(1, 1), stride=(1, 1)), ReLU(inplace=True)]
input channels: 128
extras layers: [Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1)), Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1)), Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1)), Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1)), Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1)), Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))]
VGG16 output size: 35
extra layer size: 10
extra layer 0 : Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1))
extra layer 1 : Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
extra layer 2 : Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1))
extra layer 3 : Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
extra layer 4 : Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1))
extra layer 5 : Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
extra layer 6 : Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1))
extra layer 7 : Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1))
extra layer 8 : Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1))
extra layer 9 : Conv2d(128, 256, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
Begin to build SSD-VGG...

Finished loading model!
torch.Size([1, 417044])
17
torch.Size([1, 24532, 17])
Traceback (most recent call last):
File "eval.py", line 436, in
test_net(args.save_folder, net, args.cuda, dataset,
File "eval.py", line 385, in test_net
detections = net(x).data
File "/opt/conda/envs/prac/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/SSD.Pytorch/ssd.py", line 105, in forward
output = self.detect.apply(17, 0, 200, 0.01, 0.45,
File "/data/SSD.Pytorch/layers/functions/detection.py", line 117, in forward
self.variance = cfg['variance']
KeyError: 'variance'

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

1 participant