Giter VIP home page Giter VIP logo

Comments (10)

ducha-aiki avatar ducha-aiki commented on May 20, 2024

Could you please dump here exact error message?

from hardnet.

gsygsy96 avatar gsygsy96 commented on May 20, 2024

./code/HardNetHPatchesSplits.py:426: UserWarning: nn.init.orthogonal is now deprecated in favor of nn.init.orthogonal_.
nn.init.orthogonal(m.weight.data, gain=0.6)
['/media/xxx/DATA/guan/hardnet-master/code/../data/sets/hpatches_splits/hpatches_split_a_train.pt']
Generating 15000000 triplets
0%| | 0/15000000 [00:00<?, ?it/s]
Traceback (most recent call last):
File "./code/HardNetHPatchesSplits.py", line 708, in
train_loader, test_loaders = create_loaders(load_random_triplets=triplet_flag)
File "./code/HardNetHPatchesSplits.py", line 469, in create_loaders
transform=transform_train),
File "./code/HardNetHPatchesSplits.py", line 208, in init
self.triplets = self.generate_triplets(self.labels, self.n_triplets, self.batch_size)
File "./code/HardNetHPatchesSplits.py", line 237, in generate_triplets
if len(indices[c1]) == 2: # hack to speed up process
KeyError: 68268

seems error in dict?

from hardnet.

gsygsy96 avatar gsygsy96 commented on May 20, 2024

And could you tell me
1.what means ags.batch_reduce? L2Net/random_global?
2.and args.decor and args.gor?

I know args.decor and args.gor is for L2Net, but what means batch_reduce? and anchor_swap in loss_HardNet? By the way, learning rate in code is really high...

from hardnet.

DagnyT avatar DagnyT commented on May 20, 2024

Hi!
About HardNetHPatchesSplits - can you please share more details how did you generate hpatches dataset files and did you use HPatchesDatasetCreator and it finished successfully?

About your questions, batch_reduce - variable that contains various types of sampling strategies. The initial setup is 'min', which means that for each anchor we gather the smallest negative across batch. 'random' means that we take random value across batch as negative.
'random_global' means that we have pre-generated per dataset, not per batch anchors, positives and negatives that are going to loss.
'anchor_swap' - for each anchor we choose smallest negative, for it's positive we choose smallest negative and among them we choose the smallest negative distance.
args.decor - penalty for the correlation of the descriptor dimensions, that refers to CorrelationPenaltyLoss class.
args.gor - usage of global orthogonal regularization, for more details you can check https://arxiv.org/pdf/1708.06320.pdf

from hardnet.

gsygsy96 avatar gsygsy96 commented on May 20, 2024

First, thanks for your help! Understood a lot!
And to confirm I have understand you, I will translate your answer in my word. Could review my point?

  1. batch_reduce is various types of sample (anchor,negative) pairs.
    -- min: choose the smallest data as anchor's negative
    -- random : random chose negative
    --random_global: choose generate pairs in the whole dataset
  2. anchor_swap: Sorry, I don't know what you mean. You mean choose smallest negative as anchor? So, what differences between anchor_swap and 'min'?

from hardnet.

gsygsy96 avatar gsygsy96 commented on May 20, 2024

And for hpathces, I have run HPathcesDatasetCreator correctly. And how much RAM you used when you run HPathces?

from hardnet.

ducha-aiki avatar ducha-aiki commented on May 20, 2024

@shanYanGuan anchor swap procedure is described in detail in this paper: http://www.bmva.org/bmvc/2016/papers/paper119/paper119.pdf

from hardnet.

gsygsy96 avatar gsygsy96 commented on May 20, 2024

Thanks! And how big RAM your computer have?

from hardnet.

ducha-aiki avatar ducha-aiki commented on May 20, 2024

16 Gb

from hardnet.

saisusmitha avatar saisusmitha commented on May 20, 2024

Hi, can you tell me the sequence of the codes we have to run, as there are many codes. even I got the same error :::
./code/HardNetHPatchesSplits.py:426: UserWarning: nn.init.orthogonal is now deprecated in favor of nn.init.orthogonal_.
nn.init.orthogonal(m.weight.data, gain=0.6)
So tell me how to solve it.

from hardnet.

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.