Giter Club home page Giter Club logo

ss23-hf-code's Introduction

ICCS Summer School '23: Introduction to Hugging Face -- Model code

This repository stores a simple Python script which trains a Pytorch model (adapted from an example in https://github.com/pytorch/examples/tree/7f7c222b355abd19ba03a7d4ba90f1092973cdbc).

Using

Dependencies

Python 3.

Requires Python libraries torch and torchvision. With pip:

pip install -r requirements.txt

Development environment

virtualenv

You may using virtualenv to create a self-contained Python environment for this project. In your shell, in the root of the repository, with virtualenv and pip installed, run:

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

The source command sets up your shell to use the self-contained environment until you close it. Every time you want to use it, run source venv/bin/activate in the directory you created the virtualenv in.

Nix

A Nix flake including a devshell is provided for Nix users. nix develop will set up requirements to then follow the virtualenv instructions above. (Your Nix version needs to support flakes.)

Training and saving model

python main.py --save-model

(The default epochs has been retuned from 14 to 3 for faster execution by default. Change this by adding an --epochs x option.)

ss23-hf-code's People

Contributors

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