def build(self, input_shape):
alpha_shape = input_shape[self.axis]
self.alpha = self.init((alpha_shape,),
name='alpha_pos'.format(self.name))
self.rho = K.variable(self.power_init * np.ones(alpha_shape),
name='rho_pos'.format(self.name))
if self.fit:
self.trainable_weights = [self.alpha, self.rho]
self.input_spec = [InputSpec(dtype=K.floatx(),
shape=input_shape)]
if self.initial_weights is not None:
self.set_weights(self.initial_weights)
del self.initial_weights
评论列表
文章目录