Created
January 17, 2020 13:16
-
-
Save Cospel/aa2257d38b17a1624b0662661033d22c to your computer and use it in GitHub Desktop.
preprocess_layer.py
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
| class PreprocessTFLayer(tf.keras.layers.Layer): | |
| def __init__(self, name="preprocess_tf", **kwargs): | |
| super(PreprocessTFLayer, self).__init__(name=name, **kwargs) | |
| self.preprocess = preprocess_tf | |
| def call(self, input): | |
| return self.preprocess(input) | |
| def get_config(self): | |
| config = super(PreprocessTFLayer, self).get_config() | |
| return config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment