rarilurelo / keras-VAE

20 stars 6 forks source link

CustomBatchNormalization error when update params #2

Open clockwiser opened 7 years ago

clockwiser commented 7 years ago

In keras 2 environment, running the training1 causes error. It says, two parameters from custombatch normalization are not references, so immutable to update. By the way, I changed the initilization to initializers since keras 2 provides no more support of initialization class.

Guess this class change somehow modified the weights of the custom layer to be immutable. Any help is welcom.

clockwiser commented 7 years ago

initializer creates constant tensors, so is the error. Where can find the old version source of initializations.py?

clockwiser commented 7 years ago

After find old version, changed the custom batch normalization, yet problems there are. Later found keras BatchNormalization is based on the same theory as below.

https://arxiv.org/abs/1502.03167

So switched to keras BatchNormalization, and everything looks working.