Coder Social home page Coder Social logo

Comments (2)

carlini avatar carlini commented on August 16, 2024

The code is currently set up to log all of the data to tensorboard. The easiest way would probably be to just export the tensorboard data and process it directly.

If you must do it by modifying the code, then there are two ways you could do this:

  1. The function eval_stats is called each epoch, and prints to stdout the train and test accuracies. You can access that directly here

    mixmatch/libml/train.py

    Lines 245 to 246 in 1011a1d

    self.train_print('kimg %-5d accuracy train/valid/test %.2f %.2f %.2f' %
    tuple([self.tmp.step >> 10] + accuracies))

  2. If you need the mini-batch by mini-batch train losses, you'll need to make the model call return the loss values

    mixmatch/mixmatch.py

    Lines 104 to 107 in 1011a1d

    return EasyDict(
    x=x_in, y=y_in, label=l_in, train_op=train_op, tune_op=train_bn,
    classify_raw=tf.nn.softmax(classifier(x_in, training=False)), # No EMA, for debugging.
    classify_op=tf.nn.softmax(classifier(x_in, getter=ema_getter, training=False)))

    and then will need to update train_step
    self.tmp.step = train_session.run([self.ops.train_op, self.ops.update_step],

    so that it requests the new loss you add and save it to disk from there.

from mixmatch.

hzhz2020 avatar hzhz2020 commented on August 16, 2024

Thanks a lot for the helpful comments!

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.