Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hrsma2i
hrsma2i / cosine_annealing.py
Last active November 18, 2019 07:59
# Chainer SGDR, Cosine Annealing
from math import cos, pi
import numpy
from chainer.training import extension
class CosineAnnealing(extension.Extension):
def __init__(self, lr_max, lr_min=0, T_0=1, T_mult=2,
optimizer=None):
super(CosineAnnealing, self).__init__()
[tool.poetry]
name = "smtools"
version = "0.1.0"
description = ""
authors = ["hrsma2i <[email protected]>"]
packages = [
{ include = "smtools" },
{ include = "sagemaker_tools" },
{ include = "sage_extensions" },
]