Code Monkey home page Code Monkey logo

hyperparameter-early-stop's Introduction

Hyperparameter Early Stopping

This project aims to predict the final accuracy of a DNN model for given hyperparameters values, without training the DNN model completely.

Repository organization

  • dataset: this folder contains all the dataset files
  • preprocess_dataset: this folder contains the preprocessed dataset files generated after running preprocessing.ipynb.
  • models: this folder contains the best model generated during model training in training.ipynb.
  • results: this folder contains the file containing the validation accuracies of the model in the settings asked.

Running the code

  • preprocessing.ipynb contains the necessary steps for preprocessing the data. The resulting dataset in stored in the preprocessed_dataset folder.
  • training.ipynb
    • This contains all the necessary code for training and evaluating the model.

    • The best model is saved in models folder. This is so the results can be reproduced by loading the model and directly testing the model. To do so, you can skip the training step and run the follwing code to load the model and move on to the testing.

      model = LSTM(input_dim, hidden_dim, output_dim)
      state_dict = torch.load(f'{path}/models/final_model.pt')
      model.load_state_dict(state_dict)
  • NOTE:
    • In training.ipynb, change the variable path to your folder containing all the files. For example,

      path = '/content/drive/MyDrive/Dataset_hyperEarlyStop'
    • In preprocessing.ipynb, change your working directory to your folder containing all the files. For example,

      %cd '/content/drive/MyDrive/Dataset_hyperEarlyStop/'

      And while, saving the preprocessed dataset, set the path to your folder. For example,

      train_loss_df.iloc[train_lines].to_csv("/content/drive/MyDrive/Dataset_hyperEarlyStop/preprocessed_dataset/train_loss_training.csv")

hyperparameter-early-stop's People

Contributors

akshat22 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.