Git Product home page Git Product logo

dpsh-pytorch'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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dpsh-pytorch's Issues

Question about the loss

Thanks for your effort, but I have two question about the loss:

  1. In the Logtrick function, why do you add torch.max(x, Variable(torch.FloatTensor([0.])));

  2. In the end, why do you divide num_train * len(train_label).

Thank you for your reply.

demo

I just started learning pytorch, how do I make a small demo that input two pictures to determine whether it is similar or not with your code ? Thank you .

Some questions about the definition of the loss function

The loss function is defined as
theta_x = train_outputs.mm(Variable(U).t()) / 2
logloss = (Variable(S)*theta_x - Logtrick(theta_x, use_gpu)).sum()
/ (num_train * len(train_label))
regterm = (Bbatch-train_outputs).pow(2).sum() / (num_train * len(train_label))
loss = - logloss + lamda * regterm
Why don't you use Variable(U).mm(Variable(U).t()) / 2 (All train data) or
train_outputs.mm(train_outputs.t()) / 2 (The mini-batch data ) when you calculate theta_x? In this condition,Sij can be the pairwise label between all train data or the mini-batch data. May I ask if there is any reason why you have to do so? I'm trying to rewrite the loss function in my way,but I get a huge loss. It even prints NaN,I don't know why this is happening.

training strategy

I am very interested in this code ,can you give me some advice for a higher MAP based on your code?

Seeing very low Map using nuswide

Seeing map on the order of .0015 or less. I am trying alexnet with a small batchsize and epoch and getting very low map. I'm curious if you wanna chat about how to improve the results for other datasets. If you email me at posix4e at gmail dot com

Question about validation

Hi, Jang.

As we can see, you test the model after one epoch using test set as queries to retrieval from train set. So, I have some trouble about that.

  1. It seems that you save the model after all train are finished, then how do you ensure the last model is the best one(lowerst loss or highest mAP)?

  2. Why do you use mAP to val the model by using test set as queries to retrieval from train set? How about use the loss to val the model?

Thanks for your reply.

tanh

@jiangqy hi, doctor jiang!
On the basis of DPSH, I added tanh as the last layer function of the network, and the loss suddenly increased during training, as shown below; when I removed tanh, everything was normal. Do you know what happened?
Epoch: 34/150 Train_loss: 0.23092
Epoch: 35/150 Train_loss: 0.22569
Epoch: 36/150 Train_loss: 0.22112
Epoch: 37/150 Train_loss: 0.21693
Epoch: 38/150 Train_loss: 3.01185
Epoch: 39/150 Train_loss: 4.22574
Epoch: 40/150 Train_loss: 5.80905
Epoch: 41/150 Train_loss: 9.34127
Epoch: 42/150 Train_loss: 4.26501
Epoch: 43/150 Train_loss: 5.96325
Epoch: 44/150 Train_loss: 5.72492
Epoch: 45/150 Train_loss: 6.11856

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.