Giter VIP home page Giter VIP logo

dlpractice's Introduction

This is a practice project using Kaggle competition: https://www.kaggle.com/competitions/dhu-ailab-image-classification

  1. Build the dataset of size 64x64: make sure you complete this step before training
python build_dataset.py --data_dir data\\RawData --output_dir data\\64x64

2. __Your first experiment__ We created a `base_model` directory for you under the `experiments` directory. It contains a file `params.json` which sets the hyperparameters for the experiment. It looks like
```json
{
    "learning_rate": 1e-3,
    "batch_size": 32,
    "num_epochs": 10,
    ...
}

For every new experiment, you will need to create a new directory under experiments with a similar params.json file.

  1. Train your experiment. Simply run
python train.py --data_dir data\\64x64 --model_dir experiments\\base_model  

It will instantiate a model and train it on the training set following the hyperparameters specified in params.json. It will also evaluate some metrics on the validation set.

  1. Your first hyperparameters search We created a new directory learning_rate in experiments for you. Now, run
python search_hyperparams.py --data_dir data\\64x64 --parent_dir experiments\\learning_rate

It will train and evaluate a model with different values of learning rate defined in search_hyperparams.py and create a new directory for each experiment under experiments/learning_rate/.

  1. Display the results of the hyperparameters search in a nice format
python synthesize_results.py --parent_dir experiments\\learning_rate
  1. Evaluation on the test set Once you've run many experiments and selected your best model and hyperparameters based on the performance on the validation set, you can finally evaluate the performance of your model on the test set. Run
python evaluate.py --data_dir data\\64x64 --model_dir experiments\\base_model --output True --raw_data_dir data\\RawData

dlpractice's People

Contributors

theeagleofthedesert avatar

Watchers

 avatar

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.