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

when I set the svhn’s pretrain weights for digit detection, i try to run the eval.py but a error occurs:"ValueError: Shapes (1, 1, 1024, 27) and (1, 1, 1024, 45) are incompatible" #14

Open
little-carrrot-errr opened this issue Dec 11, 2019 · 9 comments

Comments

@little-carrrot-errr
Copy link

I change the pretrained part in configs/svhn.json file like below:

"pretrained" : { "keras_format": "configs/svhn/weights.h5", "darknet_format": "yolov3.weights" }

@little-carrrot-errr
Copy link
Author

little-carrrot-errr commented Dec 11, 2019

I use the command : python eval.py -c configs/svhn.json

@DanielNehemiah
Copy link

Facing the same issue... Anyone have a solution?

@akspad
Copy link

akspad commented Mar 8, 2020

I changed the svhn.json file to the following:

{
    "model" : {
        "anchors":              [10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326],
        "labels":               ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
        "net_size":               288
    },
    "pretrained" : {
        "keras_format":             "configs/svhn/weights.h5",
        "darknet_format":           ""
    },
    "train" : {
        "min_size":             288,
        "max_size":             288,
        "num_epoch":            40,
        "train_image_folder":   "tests/dataset/svhn/imgs",
        "train_annot_folder":   "tests/dataset/svhn/anns",
        "valid_image_folder":   "",
        "valid_annot_folder":   "",
        "batch_size":           2,
        "learning_rate":        1e-4,
        "save_folder":         "configs/svhn",
        "jitter":               false
    }
}

@unknownSK
Copy link

@akspad Were you able to run it by making above mentioned changes?

@aberger7
Copy link

Has anyone gotten this to run?? I'm having the exact same issue and don't know what to do. @unknownSK @little-carrrot-errr @DanielNehemiah @akspad

@Murtaza-Kazmi
Copy link

Has anyone found the solution? I have been stuck on this for quite some time now 👎

@patrr2
Copy link

patrr2 commented Dec 13, 2020

Has anyone found the solution? I have been stuck on this for quite some time now 👎

Did you try the solution proposed by @akspad? For me it worked

@Murtaza-Kazmi
Copy link

I did spend a good time resolving this back then, so I must have :)

@le-thanh-tung
Copy link

i added "skip_detect_layer=False" to create_model function

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

8 participants