Skip to content

Instantly share code, notes, and snippets.

View ruotianluo's full-sized avatar

Ruotian(RT) Luo ruotianluo

View GitHub Profile
@ruotianluo
ruotianluo / test_roialign.py
Created October 6, 2017 02:22
A snippet to show how roialign works
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import torch
import time
def timeit():
torch.cuda.synchronize()
start = time.time()
x = torch.cuda.FloatTensor(10000,10000)
torch.cuda.synchronize()
print(time.time() - start)
return x
@ruotianluo
ruotianluo / rl-tutorial-1.ipynb
Created June 16, 2016 04:19 — forked from awjuliani/rl-tutorial-1.ipynb
Reinforcement Learning Tutorial 1 (Two-armed bandit problem)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.