Skip to content

Commit

Permalink
fixed to use tensorflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PetraVidnerova committed Jan 3, 2018
1 parent 2ebd81c commit b7e0f3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rbflayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def build(self, input_shape):
initializer=self.initializer,
trainable=True)
self.betas = self.add_weight(name='betas',
shape=(self.output_dim),
shape=(self.output_dim,),
initializer=Constant(value=self.init_betas),
#initializer='ones',
trainable=True)
Expand All @@ -69,7 +69,7 @@ def build(self, input_shape):
def call(self, x):

C = K.expand_dims(self.centers)
H = (C-x.T).T
H = K.transpose(C-K.transpose(x))
return K.exp( -self.betas * K.sum(H**2, axis=1))

#C = self.centers[np.newaxis, :, :]
Expand Down

0 comments on commit b7e0f3e

Please sign in to comment.