Instructions to use sharktide/FireTrustNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use sharktide/FireTrustNet 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/FireTrustNet") - Notebooks
- Google Colab
- Kaggle
Download custom_objects.py from sharktide/FireTrustNet: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/sharktide/FireTrustNet/resolve/main/custom_objects.py
- Command line
-
hf download hf://sharktide/FireTrustNet/custom_objects.py
-
curl -L -o custom_objects.py https://huggingface.co/sharktide/FireTrustNet/resolve/main/custom_objects.py
373 Bytes
| import tensorflow as tf | |
| from tensorflow.keras.saving import register_keras_serializable | |
| from tensorflow.keras import layers, models, backend as K | |
| import numpy as np | |
| def firetrust_activation(x): | |
| return 0.5 + tf.sigmoid(x) | |
| CUSTOM_OBJECTS = { | |
| "firetrust_activation": firetrust_activation, | |
| "mse": tf.keras.losses.MeanSquaredError | |
| } | |