Coder Social home page Coder Social logo

scheduling_utils's Introduction

LR Schedulers with C++ extensions

Implements some LR scheduling functions to decay or ramp values across timestamps.

Install

Install with: pip install scheduling_utils

Usage

Each scheduler is available with full python code or c++ code (ctypes is used for binding) wrapped into python classes.
To initialize and use for example a cosine scheduler, do the following:

# import the c++ cosine scheduler
from schedulers_cpp import CosineScheduler

# use this to use the full python version
# from schedulers import CosineScheduler

start_step = 0
stop_step = 10

start_value = 5
stop_value = 20

scheduler = CosineScheduler(start_step, stop_step, start_value, stop_value)

# get values corresponding to step
for step in range(10):
    value = scheduler.step(step)

Available Schedulers

Available Schedulers at current version:

  • Linear:

    linear-ramp linear-decay

  • Cosine:

    cosine-ramp cosine-decay

  • LinearCosine:

    linear-cosine

scheduling_utils's People

Contributors

serezd avatar

Stargazers

 avatar

Watchers

 avatar

scheduling_utils's Issues

OSError: [WinError 193] %1 не является приложением Win32

Traceback (most recent call last):
  File "C:\Users\*****\*****\vqvae-vqgan-pytorch-lightning-master\vqvae\train.py", line 15, in <module>
    from vqvae.model import VQVAE
  File "C:\Users\*****\*****\vqvae-vqgan-pytorch-lightning-master\vqvae\model.py", line 6, in <module>
    from scheduling_utils.schedulers_cpp import LinearScheduler, CosineScheduler, LinearCosineScheduler
  File "C:\Users\*****\*****\*****\venv\lib\site-packages\scheduling_utils\schedulers_cpp.py", line 6, in <module>
    schedulers_cpp = ctypes.CDLL(f'{Path(__file__).parent}\\cpp_extensions\\schedulers.so')
  File "C:\Users\*****\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 не является приложением Win32

Feels like DLL is 32-bit

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.