Coder Social home page Coder Social logo

pedro-morgado / score-zeroshot Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 21.0 2.69 MB

Semantically consistent regularizer for zero-shot learning

License: Other

Python 94.50% Shell 5.50%
attributes caffe cvpr-2017 deep-neural-networks semantics zero-shot

score-zeroshot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

score-zeroshot's Issues

word2vec

Hello!
Thank you for making the code for this project public.

I would have one question: are the embeddings in Codes_Wiki_W2V_X_Y.txt ordered according to the classes in classes.txt?

Convergence issue when training a model

When I tried to train GoogLeNet (fine-tuning) on CUB dataset with attributes, it did not converge. I just followed hyperparameters in SCoRe paper and this github code. The hyperparameters are as follows.
python score_train.py G_Attr CUB Attributes GoogLeNet -g 0.01 -c 1.0 --iters 700 --gpu 0 --init_lr 0.0005 --snapshot ./G_Attr/inception_v1.caffemodel |& tee ./G_Attr/train_G_Attr.log

test_iter: 20
test_iter: 20
test_interval: 100
base_lr: 0.0005
display: 20
max_iter: 700
lr_policy: "fixed"
momentum: 0.9
weight_decay: 0.0005
snapshot: 5000

I trained on Ubuntu 16.04 with GTX 1080 Ti, CUDA 8.0, and cuDNN v7.
Could you give me any hints for convergence?

Results:
image
I1222 15:54:06.236789 26844 solver.cpp:397] Test net output #0: SCoRe/eval/obj/accuracy = 0.0210938
I1222 15:54:06.388346 26844 solver.cpp:218] Iteration 700 (3.90624 iter/s, 5.12002s/20 iters), loss = 5.02677
I1222 15:54:06.394364 26844 solver.cpp:237] Train net output #0: SCoRe/cwReg = 0.0053981 (* 1 = 0.0053981 loss)
I1222 15:54:06.394374 26844 solver.cpp:237] Train net output 1: SCoRe/eval/obj/accuracy = 0
I1222 15:54:06.394381 26844 solver.cpp:237] Train net output 2: SCoRe/objLoss = 5.02252 (* 0.990099 = 4.9728 loss)
I1222 15:54:06.394387 26844 solver.cpp:237] Train net output #3: SCoRe/semLoss = 216.479 (* 0.000224393 = 0.0485763 loss)
I1222 15:54:06.394403 26844 sgd_solver.cpp:105] Iteration 700, lr = 0.0005

some error about train_eval_CUB.sh

I carry out train_eval_CUB.sh use linux,inception_v1.caffemodel. When carry out to

Evaluate SCoRe model

python score_eval.py ${MODEL_DIR} CUB Attributes GoogLeNet

I meet this problem and i can't slove it.
Layer SCoRe/obj/fc_target (weights) initialized
Traceback (most recent call last):
File "score_eval.py", line 139, in
main(parse_cmd())
File "score_eval.py", line 134, in main
mca, acc, semAcc, semAUC = evaluate_model(classes, constrains, LMDBs, args)
File "score_eval.py", line 111, in evaluate_model
semAcc[mode], semAUC[mode] = eval_semantics(scores, semantics, args)
File "score_eval.py", line 50, in eval_semantics
acc[s] = (pred*(lbl-0.5) > 0).astype(float).mean()
ValueError: operands could not be broadcast together with shapes (10,) (2933,)

Can you give me some suggestion?

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.