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
|
Download README.md from Hapyr/deep-learning-architectures-weights: direct link, hf CLI and curl.
- Browser
- Download file 1.55 kB
-
https://huggingface.co/Hapyr/deep-learning-architectures-weights/resolve/main/README.md
- Command line
-
hf download hf://Hapyr/deep-learning-architectures-weights/README.md
-
curl -L -o README.md https://huggingface.co/Hapyr/deep-learning-architectures-weights/resolve/main/README.md
1.55 kB
| license: mit | |
| tags: | |
| - tensorflow | |
| - keras | |
| - cnn | |
| - lstm | |
| - gan | |
| - cifar10 | |
| - mnist | |
| # 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 | |
| ```python | |
| 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`): | |
| ```python | |
| 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_text` e 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. | |