Skip to content

Instantly share code, notes, and snippets.

View m3hrdadfi's full-sized avatar
🎯
Focusing

Mehrdad Farahani m3hrdadfi

🎯
Focusing
View GitHub Profile
@tdiggelm
tdiggelm / tf_multiheadattention.py
Last active October 25, 2019 08:10
Tensorflow 2.0 compatible version of MultiHeadAttention as in BERT from paper "Attention Is All You Need", see https://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf
import tensorflow as tf
class MultiHeadAttention(tf.keras.layers.Layer):
""" Mirrors the implementation from paper 'Attention Is All You Need' and
corresponding source code in
https://github.com/google-research/bert/blob/master/modeling.py. """
def __init__(self,
size_per_head=16,
num_attention_heads=12,
dropout_rate=0,
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@bdchauvette
bdchauvette / .babelrc
Last active June 21, 2021 17:44
Minimal babel boilerplate
{
"presets": [ "es2015" ]
}
@colah
colah / translations.md
Last active December 28, 2019 06:31
A list of translations of posts from colah.github.io
@kany
kany / sendmail_setup.md
Last active January 27, 2025 11:55
Setup SENDMAIL on Mac OSX Yosemite
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});