Mariamsayed17/first-aid-api
0
1import tensorflow as tf2 3class SafeDense(tf.keras.layers.Dense):4 def __init__(self, *args, **kwargs):5 kwargs.pop("quantization_config", None)6 super().__init__(*args, **kwargs)7 8 9def load_safe_model(path):10 return tf.keras.models.load_model(11 path,12 compile=False,13 custom_objects={14 "Dense": SafeDense15 }16 )