Instructions to use sharktide/TornadoTrustNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use sharktide/TornadoTrustNet with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://sharktide/TornadoTrustNet") - Notebooks
- Google Colab
- Kaggle
Download custom_objects.py from sharktide/TornadoTrustNet: direct link, hf CLI and curl.
- Browser
- Download file 390 Bytes
-
https://huggingface.co/sharktide/TornadoTrustNet/resolve/main/custom_objects.py
- Command line
-
hf download hf://sharktide/TornadoTrustNet/custom_objects.py
-
curl -L -o custom_objects.py https://huggingface.co/sharktide/TornadoTrustNet/resolve/main/custom_objects.py
390 Bytes
| from tensorflow.keras.models import load_model | |
| import tensorflow as tf | |
| from tensorflow.keras.saving import register_keras_serializable | |
| from tensorflow.keras import layers, models, backend as K | |
| def trust_activation(x): | |
| return 0.5 + tf.sigmoid(x) | |
| CUSTOM_OBJECTS = { | |
| 'trust_activation': trust_activation, | |
| 'mse': tf.keras.losses.MeanSquaredError() | |
| } |