RobinKa / tfga

Python package for Geometric / Clifford Algebra with TensorFlow
MIT License
48 stars 7 forks source link

Make all Keras layers serializable #9

Closed RobinKa closed 4 years ago

RobinKa commented 4 years ago

get_config() needs to return a serializable dict, right now it contains some tensors and other objects which can't be serialized

RobinKa commented 4 years ago

Branch: https://github.com/RobinKa/tfga/tree/feature/serializable-layers

Create layer base-class GeometricAlgebraLayer which does the following:

All other GA layers inherit from GeometricAlgebraLayer and also have the @register_keras_serializable(package="TFGA") attribute to make them serializable without passing a custom objects dict.

There's still the issue that each layer creates their own GeometricAlgebra object from the metric. Should be solved by creating only one for each unique metric somehow.