Help - save/load custom objects

Hi,

I’ve a probabilistic model. I’m trying to save and load my model but I’ve got error message
TypeError: ‘str’ object is not callable

I’ve tried to follow
https://www.tensorflow.org/guide/keras/serialization_and_saving#registering_the_custom_object
Maybe I missed something

My project is here:
https://github.com/jsmith173/BNN/blob/main/layer1.py

Thanks