How to save tensorflow model with DistributionLambda layer using

  google-cloud-platform, python, tensorflow

OperatorNotAllowedInGraphError: iterating over tf.Tensor is not allowed: AutoGraph did convert this function. This might indicate you are trying to use an unsupported feature.

When using My model has a DistributionLambda layer which is what causes the problem. I want to keep my probabilistic layer, how can I save the model?

Source: Python Questions