Giter Club home page Giter Club logo

Comments (5)

HelloTobe avatar HelloTobe commented on July 18, 2024

@HobbitLong
Besides, I notice that the outputsize equals the length of the dataset in Cifar100 (Here is 50K). Is it the same in ImageNet which has more than 1M training images?

from repdistiller.

HobbitLong avatar HobbitLong commented on July 18, 2024

Hi, @HelloTobe

I'm wondering why do you register two memories here in
self.register_buffer('memory_v1', torch.rand(outputSize, inputSize).mul_(2 * stdv).add_(-stdv)) self.register_buffer('memory_v2', torch.rand(outputSize, inputSize).mul_(2 * stdv).add_(-stdv)),

A linear projection layer still needs to be learned during the training. This layer acts to align the feature dimension of student and teacher.

Besides, I notice that the outputsize equals the length of the dataset in Cifar100 (Here is 50K). Is it the same in ImageNet which has more than 1M training images?

That's related to NCE. Just let outputsize = len(dataset) should suffice. Therefore it's 1M in ImageNet.

from repdistiller.

HelloTobe avatar HelloTobe commented on July 18, 2024

@HobbitLong
Many thanks!

from repdistiller.

HelloTobe avatar HelloTobe commented on July 18, 2024

Hi, @HobbitLong
weight_v1 = torch.index_select(self.memory_v1, 0, idx.view(-1)).detach()
weight_v1 = weight_v1.view(batchSize, K + 1, inputSize)
out_v2 = torch.bmm(weight_v1, v2.view(batchSize, inputSize, 1))

According to the above code, why in the following memory_v1 is updated with v1 instead of v2? Since there is no relation between memory_v1 and v1.

l_pos = torch.index_select(self.memory_v1, 0, y.view(-1))
l_pos.mul_(momentum)
l_pos.add_(torch.mul(v1, 1 - momentum))

from repdistiller.

HobbitLong avatar HobbitLong commented on July 18, 2024

@HelloTobe , the point of CRD is contrasting between teacher and student, e.g., choose anchor from the teacher (v2), choose positives and negatives from student (memory_v1).

from repdistiller.

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.