Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making the PFS implementation more flexible and reproducible
- Loading branch information
Yves-Laurent
committed
Apr 10, 2022
1 parent
db1ce85
commit 7e30ca0
Showing
13 changed files
with
182 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION = 1.4.6 | ||
VERSION = 1.4.7 | ||
|
||
# Update the s3 bucket of the docs website | ||
deploy_docs: | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Global default training configs | ||
""" | ||
# LEARNING PARAMETERS | ||
LR = 0.005 | ||
EPOCHS = 20 | ||
|
||
# ADAM PARAMETERS | ||
BETA_1 = 0.9 | ||
BETA_2 = 0.999 | ||
EPSILON = 1e-04 | ||
AMSGRAD = False | ||
BATCH_SIZE = 500 | ||
|
||
|
||
def set_default_parameter(name, value): | ||
''' | ||
Utility function to change parameters above at runtime. | ||
''' | ||
import logging | ||
globals()[name.upper()] = value | ||
return | ||
|
||
def get_default_parameter(name): | ||
return eval(name.upper()) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Custom Tensorflow initializers. | ||
""" | ||
import logging | ||
|
||
from tensorflow.keras.initializers import GlorotUniform | ||
|
||
LOCAL_SEED = None | ||
INITIALIZER_COUNT = 0 | ||
|
||
def frozen_glorot_uniform(): | ||
''' | ||
Deterministic GlorotUniform initializer. | ||
''' | ||
if LOCAL_SEED is not None: | ||
initializer = GlorotUniform(LOCAL_SEED+INITIALIZER_COUNT) | ||
globals()['INITIALIZER_COUNT'] = INITIALIZER_COUNT + 1 | ||
return initializer | ||
else: | ||
return GlorotUniform() | ||
|
||
def set_initializers_seed(seed): | ||
globals()['LOCAL_SEED'] = seed |
This file contains 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
Oops, something went wrong.