Giter Site home page Giter Site logo

shaotengliu / dynamic_ttt_old Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yueatsprograms/ttt_cifar_release

0.0 2.0 1.0 76.74 MB

Test-Time Training for Out-of-Distribution Generalization (including scale corruption)

Python 93.63% Shell 6.37%

dynamic_ttt_old's Introduction

Code release for Test-Time Training for Out-of-Distribution Generalization.
This code produces our results on CIFAR-10-C and CIFAR-10.1. The ImageNet results are produced by this repository.

Requirements

  1. Our code requires pytorch version 1.0 or higher, with at least one modern GPU of adequate memory.
  2. We ran our code with python 3.7. Compatibility with python 2 is possible maybe with some modifications.
  3. Most of the packages used should be included with anaconda, except maybe two small utilities:
    • tqdm, which we installed with conda install tqdm.
    • colorama, which we installed with conda install colorama.
  4. Download the two datasets into the same folder:

Steps

  1. Clone our repository with git clone https://github.com/yueatsprograms/ttt_cifar_release.
  2. Inside the repository, set the data folder to where the datasets are stored by editing:
    • --dataroot argument in main.py.
    • --dataroot argument in baseline.py.
    • dataroot variable in script_test_c10.py.
  3. Run script.sh for the main results, and script_baseline.sh for the baseline results.
  4. The results are stored in the respective folders in results/.
  5. Once everything is finished, the results can be compiled and visualized with the following utilities:
    • show_table.py parses the results into tables and prints them.
    • show_plot.py makes bar plots like those in our paper, and prints the tables in latex format; requires first running show_table.py.
    • show_grad.py makes the gradient correlation plot in our paper.

dynamic_ttt_old's People

Contributors

test-time-training avatar

Watchers

 avatar  avatar

Forkers

rishipawar842

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.