In order to conform with the current API standard, all layers must:
- Inherit from either
keras.layers.Layeror its subclasses. - Register as a keras global object so it can be serialized properly:
@tf.keras.utils.register_keras_serializable(package='Addons')
- Simple unittests that demonstrate the layer is behaving as expected.
- To run your
tf.functionsin eager mode and graph mode in the tests, you can use the@pytest.mark.usefixtures("maybe_run_functions_eagerly")decorator. This will run the tests twice, once normally, and once withtf.config.run_functions_eagerly(True). - Run
layer_teston the layer.
- Update the CODEOWNERS file