mirror of
https://github.com/wassname/DenseNet-Keras.git
synced 2026-06-27 17:46:33 +08:00
Updated to Keras (2.0.5) and Tensorflow (1.2.1)
This commit is contained in:
+6
-4
@@ -1,6 +1,8 @@
|
||||
from keras import initializations
|
||||
from keras.engine import Layer, InputSpec
|
||||
|
||||
try:
|
||||
from keras import initializations
|
||||
except ImportError:
|
||||
from keras import initializers as initializations
|
||||
import keras.backend as K
|
||||
|
||||
class Scale(Layer):
|
||||
@@ -45,8 +47,8 @@ class Scale(Layer):
|
||||
self.input_spec = [InputSpec(shape=input_shape)]
|
||||
shape = (int(input_shape[self.axis]),)
|
||||
|
||||
self.gamma = self.gamma_init(shape, name='{}_gamma'.format(self.name))
|
||||
self.beta = self.beta_init(shape, name='{}_beta'.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.trainable_weights = [self.gamma, self.beta]
|
||||
|
||||
if self.initial_weights is not None:
|
||||
|
||||
Reference in New Issue
Block a user