This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Copyright Kunihiko Miyoshi, Preferred Networks Inc. | |
MIT License | |
Reference | |
https://github.com/pfnet/chainer/blob/master/examples/vae/net.py | |
https://github.com/crcrpar/chainer-VAE | |
https://github.com/mlosch/CVAE-Torch/blob/master/CVAE.lua | |
""" |