Updated README

This commit is contained in:
Felix Yu
2017-07-02 19:39:07 +08:00
parent 3440f42a89
commit c8590739f3
2 changed files with 10 additions and 2 deletions
+6 -2
View File
@@ -36,7 +36,11 @@ Check [this](https://github.com/flyyufelix/cnn_finetune) out to see example of f
## Requirements ## Requirements
* Keras 1.2.2 * Keras ~~1.2.2~~ 2.0.5
* Theano 0.8.2 or TensorFlow 0.12.0 * Theano 0.8.2 or TensorFlow ~~0.12.0~~ 1.2.1
## Updates
* Keras 2.0.5 and TensorFlow 1.2.1 are supported
+4
View File
@@ -47,8 +47,12 @@ class Scale(Layer):
self.input_spec = [InputSpec(shape=input_shape)] self.input_spec = [InputSpec(shape=input_shape)]
shape = (int(input_shape[self.axis]),) 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.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.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] self.trainable_weights = [self.gamma, self.beta]
if self.initial_weights is not None: if self.initial_weights is not None: