Skip to content

Instantly share code, notes, and snippets.

View mrdrozdov's full-sized avatar

Andrew Drozdov mrdrozdov

View GitHub Profile
@mrdrozdov
mrdrozdov / vision.md
Created September 14, 2016 02:47
Computer Vision Overview

"There's no good textbooks. Everything has changed." - Fergus talking about how Computer Vision is all about Neural Nets now.

Famous Professors

  • Fei Fei Li - Leads Stanford Vision Group - Known for ImageNet
  • Yann Lecun - Leads NYU ML Group - Head of Facebook AI - Known for Convolutional Neural Nets
  • Yoshua Bengio - Leads U. of Montreal ML Group
  • George Hinton - Leads U. of Toronto ML Group - Google Researcher - Lecun, Bengio, Hinton are like the deep learning 3 musketeers.

Prominent PhDs

@mrdrozdov
mrdrozdov / sentence_model.py
Created September 25, 2016 21:25
Simpler Chainer RNN
class RNN_Sentence(Chain):
def __init__(self, model_dim, word_embedding_dim, vocab_size, compose_network,
seq_length,
num_classes,
initial_embeddings,
):
super(RNN_Sentence, self).__init__(
embed=L.EmbedID(vocab_size, word_embedding_dim, initialW=initial_embeddings), # word embedding
mid=L.LSTM(word_embedding_dim, model_dim), # the first LSTM layer
out=L.Linear(model_dim, num_classes), # the feed-forward output layer
@mrdrozdov
mrdrozdov / spinn.log
Last active October 19, 2016 12:51
SPINN Chainer Logs
$ python -m spinn.models.fat_classifier \
--batch_size 32 \
--ckpt_path rnn_scratch_6 \
--connect_tracking_comp \
--data_type snli \
--embedding_data_path ../glove/glove.840B.300d.txt \
--embedding_keep_rate 0.9 \
--eval_data_path ../snli_1.0/snli_1.0_dev.jsonl \
--eval_seq_length 25 \
--experiment_name model0_scratch_6 \
@mrdrozdov
mrdrozdov / run.sh
Created October 25, 2016 19:15
How to run SPINN Chainer
$ cd path/to/spinn/checkpoints
$ export PYTHONPATH=$PYTHONPATH:../python
$ python -m spinn.models.fat_classifier \
--batch_size 32 \
--ckpt_path rnn_scratch_6.ckpt_best \
--connect_tracking_comp \
--data_type snli \
--embedding_data_path ../python/spinn/tests/test_embedding_matrix.5d.txt \
--embedding_keep_rate 0.9 \
--eval_data_path ../snli_1.0/snli_1.0_dev.jsonl \
@mrdrozdov
mrdrozdov / tree_states.txt
Last active October 26, 2016 20:23
Tree States
created with: https://gist.github.com/mrdrozdov/d11739bdf7a9ff5d7c4783de7f8ac161
PADDING: 16
INITIAL SENTENCE: A person on a horse jumps over a broken down airplane
PADDING SENTENCE: EMPTY EMPTY EMPTY EMPTY EMPTY A person on a horse jumps over a broken down airplane
TREE DEPTH: 5
TREE STATES:
These are the hidden states generated with the
@mrdrozdov
mrdrozdov / tree_state.py
Created October 26, 2016 20:14
tree_stae
import math
def recursive_tree(root, spacing=0, depth=1):
print("{:3}: {} {}".format(depth, "-"*spacing, str(root)))
if isinstance(root, tuple):
for c in root:
recursive_tree(c, spacing+4, depth+1)
# Preprocessing
padding = 16
@mrdrozdov
mrdrozdov / mac.md
Last active November 5, 2016 19:26
Setting up a Mac
  1. Update your machine!

Install Software

  • Chrome
  • iTerm 2
  • Sublime 3
  • Zotero

Chrome Extensions

@mrdrozdov
mrdrozdov / example.py
Last active December 28, 2018 22:10
Logging in Tensorflow
from tf_logger import TFLogger
""" Example of using TFLogger to save train & dev statistics. To visualize
in tensorboard simply do:
tensorboard --logdir /path/to/summaries
This code does depend on Tensorflow, but does not require that your model
is built using Tensorflow. For instance, could build a model in Chainer, then
@mrdrozdov
mrdrozdov / .gitconfig
Created November 6, 2016 01:27
sample .gitconfig
[user]
name = Andrew Drozdov
email = andrew@mrdrozdov.com
[credential]
helper = osxkeychain
[color]
ui = true
[alias]
gr = log --graph --full-history --all --color --pretty=tformat:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m"
undo-commit = reset --soft HEAD^