Instructions to use sharktide/QuakeTrustNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use sharktide/QuakeTrustNet with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://sharktide/QuakeTrustNet") - Notebooks
- Google Colab
- Kaggle
File size: 327 Bytes
6f82c72 | 1 2 3 4 5 6 7 8 9 10 11 12 | import tensorflow as tf
from tensorflow.keras import layers, models
from tensorflow.keras.saving import register_keras_serializable
@register_keras_serializable()
def trust_activation(x):
return 0.5 + tf.sigmoid(x)
CUSTOM_OBJECTS = {
'mse': tf.keras.losses.MeanSquaredError,
'trust_activation': trust_activation
} |