- Clone github repository
git clone git@github.com:SPEECHCOG/transformer_workshop.git
-
If you do not have conda in your machine, plesas follow the instructions on their website: installing conda
-
Install workshop environment
conda env create -f workshop.yml
If you are using other OS than Linux please follow these instructions:
conda create --name workshop python=3
conda activate workshop
conda install -c conda-forge keras
conda install -c conda-forge tensorflow=2.0
conda install -c conda-forge jupyter
conda install -c conda-forge matplotlib
In some OSX it might be needed to add the following code at the beginning of the notebook:
import os
os.environ[‘KMP_DUPLICATE_LIB_OK’]=‘True’- Activate environment
conda activate workshop
- Open Jupyter notebook and select autoencoder.ipyb
jupyter notebook
- We talked about the history of attention mechanisms in neural networks, and autoencoders (simple and VAE) using MNIST dataset.
- Slides:
slides/Presentation_workshop_session1.pdf - Notebooks:
autoencoder_exercise.ipynbautoencoder_answer.ipynbvae.ipynb
- Slides:
- We talked about how the attention mechanims works, what are the query, key and value vectors?. We added attention to the VAE example using
keras attention layer. We implemented a sentiment classifier using a custom layer for local addictive attention.
- Slides:
slides/Presentation_workshop_session2.pdf - Notebooks:
vae_cnn.ipynbvae_cnn_attention_exercise.ipynbvae_cnn_attention_answer.ipynb2D_ae_simple_vs_attention.ipynbsentiment_classifier.ipynb
- Slides:
- We talked about multi-head self-attenton works. We followed the text classifier tutorial from keras API and added transformer block to our previous sentiment
classifier problem.
- Siles:
slides/Presentation_workshop_session3.pdf - Notebooks:
text_classification.ipynbsentiment_classifier_transformer_exercise.ipynbsentiment_classifier_transformer_answer.ipynb
- Siles:
You can post your suggestion as an issue in this repository: new issue