Commit 78ccd295 authored by Yuxin Wu's avatar Yuxin Wu

rename common.py to saver.py in callbacks

parent 3fa1a499
...@@ -74,3 +74,4 @@ checkpoint ...@@ -74,3 +74,4 @@ checkpoint
*.json *.json
*.prototxt *.prototxt
snippet snippet
*.txt
...@@ -33,4 +33,5 @@ It requires the datasets released by the original authors. ...@@ -33,4 +33,5 @@ It requires the datasets released by the original authors.
Reproduce a mnist experiement in InfoGAN. Reproduce a mnist experiement in InfoGAN.
By assuming 10 latent variables corresponding to a categorical distribution and maximizing mutual information, By assuming 10 latent variables corresponding to a categorical distribution and maximizing mutual information,
the network unsupervisedly learns to map the 10 variables to 10 digits. the network learns to map the 10 variables to 10 digits in a completely unsupervised way.
![infogan](demo/InfoGAN-mnist.jpg)
...@@ -172,7 +172,8 @@ class ScheduledHyperParamSetter(HyperParamSetter): ...@@ -172,7 +172,8 @@ class ScheduledHyperParamSetter(HyperParamSetter):
def __init__(self, param, schedule, interp=None): def __init__(self, param, schedule, interp=None):
""" """
:param schedule: [(epoch1, val1), (epoch2, val2), (epoch3, val3), ...] :param schedule: [(epoch1, val1), (epoch2, val2), (epoch3, val3), ...]
The value is fixed to val1 in epoch [epoch1, epoch2), and so on. (ep, val) means set the param to `val` after the `ep`th epoch.
If epoch == 0, the value is set before training.
:param interp: None: no interpolation. 'linear': linear interpolation :param interp: None: no interpolation. 'linear': linear interpolation
""" """
schedule = [(int(a), float(b)) for a, b in schedule] schedule = [(int(a), float(b)) for a, b in schedule]
......
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
# File: common.py # File: saver.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com> # Author: Yuxin Wu <ppwwyyxx@gmail.com>
import tensorflow as tf import tensorflow as tf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment