Instructions to use Hapyr/deep-learning-architectures-weights with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Hapyr/deep-learning-architectures-weights 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://Hapyr/deep-learning-architectures-weights") - Notebooks
- Google Colab
- Kaggle
Deep Learning Architectures β pesos (versoes reduzidas)
Pesos treinados do projeto portfolio/projects/deep-learning-architectures, em versoes reduzidas para rodar em CPU.
| Arquivo | Arquitetura | Dataset | Resultado |
|---|---|---|---|
cnn_cifar10.keras |
CNN | CIFAR-10 | val_accuracy 0.666 (5 epocas; original usa 15) |
lstm_spam.keras + lstm_spam_tokenizer.pkl |
LSTM | SMS Spam Collection | val_accuracy 0.9641 |
gan_generator.keras / gan_discriminator.keras |
GAN (DCGAN) | MNIST | 3 epocas (original usa 100) |
gan_samples.png |
β | β | amostras geradas pelo generator |
Como carregar
import tensorflow as tf
modelo = tf.keras.models.load_model("cnn_cifar10.keras")
LSTM (o tokenizador e manual, pois o Keras 3 removeu tf.keras.preprocessing):
import pickle, tensorflow as tf
tok = pickle.load(open("lstm_spam_tokenizer.pkl", "rb"))
word2idx, maxlen = tok["word2idx"], tok["maxlen"]
modelo = tf.keras.models.load_model("lstm_spam.keras")
Notas
- Receitas reduzidas de proposito (menos epocas/camadas) para treinar em CPU; os notebooks originais estao em
portfolio/projects/deep-learning-architectures/notebooks. - O Transformer (notebook 04, PTβEN) exige
tensorflow-datasets,tensorflow_texte dataset web-archive: use o notebook original (Colab). Nao ha pesos aqui. - Datasets: CIFAR-10 e MNIST (Keras), SMS Spam Collection via mirror TSV do pycon-2016-tutorial.
- Downloads last month
- 124
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support