From c8590739f326cac33a3e5c557249d91c5c52c859 Mon Sep 17 00:00:00 2001 From: Felix Yu Date: Sun, 2 Jul 2017 19:39:07 +0800 Subject: [PATCH] Updated README --- README.md | 8 ++++++-- custom_layers.py | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 618487f..4c74855 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,11 @@ Check [this](https://github.com/flyyufelix/cnn_finetune) out to see example of f ## Requirements -* Keras 1.2.2 -* Theano 0.8.2 or TensorFlow 0.12.0 +* Keras ~~1.2.2~~ 2.0.5 +* Theano 0.8.2 or TensorFlow ~~0.12.0~~ 1.2.1 + +## Updates + +* Keras 2.0.5 and TensorFlow 1.2.1 are supported diff --git a/custom_layers.py b/custom_layers.py index c761481..7f7b04a 100644 --- a/custom_layers.py +++ b/custom_layers.py @@ -47,8 +47,12 @@ class Scale(Layer): self.input_spec = [InputSpec(shape=input_shape)] shape = (int(input_shape[self.axis]),) + # Tensorflow >= 1.0.0 compatibility self.gamma = K.variable(self.gamma_init(shape), name='{}_gamma'.format(self.name)) self.beta = K.variable(self.beta_init(shape), name='{}_beta'.format(self.name)) + #self.gamma = self.gamma_init(shape, name='{}_gamma'.format(self.name)) + #self.beta = self.beta_init(shape, name='{}_beta'.format(self.name)) + self.beta = self.beta_init(shape) self.trainable_weights = [self.gamma, self.beta] if self.initial_weights is not None: