Skip to content

Instantly share code, notes, and snippets.

View etienne87's full-sized avatar
🐶
Working from home

etienne87

🐶
Working from home
View GitHub Profile
@etienne87
etienne87 / torch_bilateral_gray.py
Created March 22, 2018 07:51
how to make a bilateral filter using torch
#!/usr/bin/python
# torch_bilateral: bi/trilateral filtering in torch
import torch
from torch import nn
from torch.autograd import Variable
import torch.nn.functional as F
from torch.nn import Parameter
import numpy as np
import pdb
import time
@etienne87
etienne87 / pg-pong.py
Last active October 3, 2021 06:36 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
from chainer import cuda
import cupy as cp
import time, threading
#backend