Skip to content

Instantly share code, notes, and snippets.

View lijx10's full-sized avatar

Li Jiaxin lijx10

View GitHub Profile
@lijx10
lijx10 / emd.py
Created August 18, 2018 15:09 — forked from pclucas14/emd.py
Wrapper for EMD in pytorch
from torch.autograd import Function, Variable
import numpy as np
import torch
import torch.nn as nn
import pdb
from torch.nn.modules.utils import _pair
from pyinn.utils import Dtype, Stream, load_kernel
import torch.nn.functional as F
from torch.autograd import gradcheck