keras-complex icon indicating copy to clipboard operation
keras-complex copied to clipboard

Fixes for newer tensorflow version

Open casabre opened this issue 1 year ago • 1 comments

closes #23

casabre avatar Jun 10 '24 12:06 casabre

@JesperDramsch maybe you can help. Do you know, why the Keras Layer does not have add_update during runtime?

...
           if self.center:
                update_list.append(K.moving_average_update(self.moving_mean, mu, self.momentum))
            if self.scale:
                update_list.append(K.moving_average_update(self.moving_Vrr, Vrr, self.momentum))
                update_list.append(K.moving_average_update(self.moving_Vii, Vii, self.momentum))
                update_list.append(K.moving_average_update(self.moving_Vri, Vri, self.momentum))
            self.add_update(update_list)
...

Finally, it is leading to

...
E       RuntimeError: Exception encountered when calling ComplexBatchNormalization.call().
E       
E       Could not automatically infer the output shape / dtype of 'complex_batch_normalization' (of type ComplexBatchNormalization). Either the `ComplexBatchNormalization.call()` method is incorrect, or you need to implement the `ComplexBatchNormalization.compute_output_spec() / compute_output_shape()` method. Error encountered:
E       
E       'ComplexBatchNormalization' object has no attribute 'add_update'
...

Any ideas? Because according to the documentation it seems to be there...

casabre avatar Jun 10 '24 14:06 casabre