Skip to content

Commit

Permalink
Merge pull request mmistakes#182 from pesser/cyclic_vars
Browse files Browse the repository at this point in the history
fixed missing **kwargs
  • Loading branch information
pesser authored Oct 7, 2019
2 parents aede72f + 81c8231 commit 636c402
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Switched opencv2 functions with manual ones to get rid of the dependency.
- `edeval` now allows for differnet callback interface via the config. Callbacks are now entered as `dicts`, which allows to also pass keyword arguments to the callbacks from the config.
- `make_batches` now produces deep batches of examples. See documentation of `deep_lod2dol` or the section "Datasets and Batching" in the documention.
- `make_var` was broken for period variables because subcommands lacked `**kwargs` in definition. This is fixed now.

### Removed
- It is no longer possible to pass callbacks as list via the config
15 changes: 11 additions & 4 deletions edflow/tf_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


def make_linear_var(
step, start, end, start_value, end_value, clip_min=None, clip_max=None
step, start, end, start_value, end_value, clip_min=None, clip_max=None, **kwargs
):
r"""
Linear from :math:`(a, \alpha)` to :math:`(b, \beta)`, i.e.
Expand Down Expand Up @@ -43,7 +43,7 @@ def make_linear_var(
return tf.clip_by_value(linear, clip_min, clip_max)


def make_periodic_step(step, start_step: int, period_duration_in_steps: int):
def make_periodic_step(step, start_step: int, period_duration_in_steps: int, **kwargs):
"""
Returns step within the unit period cycle specified
Expand All @@ -68,7 +68,7 @@ def make_periodic_step(step, start_step: int, period_duration_in_steps: int):
return unit_step


def make_exponential_var(step, start, end, start_value, end_value, decay):
def make_exponential_var(step, start, end, start_value, end_value, decay, **kwargs):
r"""
Exponential from :math:`(a, \alpha)` to :math:`(b, \beta)` with decay
rate decay.
Expand Down Expand Up @@ -101,7 +101,14 @@ def make_exponential_var(step, start, end, start_value, end_value, decay):


def make_staircase_var(
step, start, start_value, step_size, stair_factor, clip_min=0.0, clip_max=1.0
step,
start,
start_value,
step_size,
stair_factor,
clip_min=0.0,
clip_max=1.0,
**kwargs
):
r"""
Parameters
Expand Down

0 comments on commit 636c402

Please sign in to comment.