Giter VIP home page Giter VIP logo

Comments (4)

carlini avatar carlini commented on June 14, 2024

When we save a checkpoint, we save the EMA model weights. Then when you restore you get the restored EMA weights and can use those directly.

from mixmatch.

dlnewbie-h avatar dlnewbie-h commented on June 14, 2024

Thanks for your response. Just to confirm what you mean, so you are saying the EMA model weights are already saved in the code, and when we use saver.restore(sess, save_path) we already get the EMA weights? Or are you saying people who uses the code should do it themselves?

from mixmatch.

carlini avatar carlini commented on June 14, 2024

Both are saved if I remember correctly. If you run

mixmatch/libml/train.py

Lines 188 to 198 in 1011a1d

def eval_checkpoint(self, ckpt=None):
self.eval_mode(ckpt)
self.cache_eval()
raw = self.eval_stats(classify_op=self.ops.classify_raw)
ema = self.eval_stats(classify_op=self.ops.classify_op)
self.tune(16384)
tuned_raw = self.eval_stats(classify_op=self.ops.classify_raw)
tuned_ema = self.eval_stats(classify_op=self.ops.classify_op)
print('%16s %8s %8s %8s' % ('', 'labeled', 'valid', 'test'))
print('%16s %8s %8s %8s' % (('raw',) + tuple('%.2f' % x for x in raw)))
print('%16s %8s %8s %8s' % (('ema',) + tuple('%.2f' % x for x in ema)))

then you should be able to see both the raw (no EMA) and EMA model predictions.

from mixmatch.

dlnewbie-h avatar dlnewbie-h commented on June 14, 2024

In the code snippet what is the self.tune(16384) doing? why 16384?

Thanks again, I'm really interested in your work!

from mixmatch.

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.