Skip to content

Instantly share code, notes, and snippets.

# Pytorch implementation of LSHHash from https://github.com/kayzhu/LSHash
# Homework: Try to implement LSHHash in pytorch to speed up meanshift.
# Motivation: i.e. why calculate all distances when you need only a few.
import numpy as np
import importlib
import torch_utils
importlib.reload(torch_utils)
from torch_utils import *
@surya501
surya501 / airport-embedding.py
Created March 14, 2017 18:31
Airport embedding in keras
# %matplotlib inline
import pandas as pd
import numpy as np
import keras
import tensorflow as tf
import os
from keras.models import Model
from keras.layers import Input, Embedding, merge
from keras.layers.core import Flatten, Dense, Dropout, Lambda