The natural way to start with CUDA if you plan to be self taught is:
-
CUDA by Example: An Introduction to General-Purpose GPU Programming by Jason Sanders and Edward Kandrot Nice introduction. It is more like playing with your GPU and admire its capabilities.
-
Programming Massively Parallel Processors, Second Edition: A Hands-on Approach by David B. Kirk and Wen-mei W. Hwu It explains a lot of things in GPU Programming. You simply can't go without it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/face_filter.py b/lib/face_filter.py | |
index 096709d..cb4a10f 100644 | |
--- a/lib/face_filter.py | |
+++ b/lib/face_filter.py | |
@@ -5,7 +5,7 @@ import logging | |
from lib.vgg_face import VGGFace | |
from lib.image import read_image | |
-from plugins.extract.pipeline import Extractor | |
+from plugins.extract.pipeline import Extractor, ExtractMedia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" int runOpenCV(halide_buffer_t *im1, halide_buffer_t *im2, halide_buffer_t *im3, halide_buffer_t *out) { | |
// width | |
const int min0 = out->dim[0].min; | |
const int max0 = out->dim[0].min + out->dim[0].extent - 1; | |
const int width = out->dim[0].extent; | |
// height | |
const int min1 = out->dim[1].min; | |
const int max1 = out->dim[1].min + out->dim[1].extent - 1; | |
const int height = out->dim[1].extent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InProceedings{Campbell_2017_ICCV, | |
author = {Campbell, Dylan and Petersson, Lars and Kneip, Laurent and Li, Hongdong}, | |
title = {Globally-Optimal Inlier Set Maximisation for Simultaneous Camera Pose and Feature Correspondence}, | |
booktitle = {The IEEE International Conference on Computer Vision (ICCV)}, | |
month = {Oct}, | |
year = {2017} | |
} | |
@InProceedings{Huang_2017_ICCV, | |
author = {Huang, Chao-Tsung}, | |
title = {Robust Pseudo Random Fields for Light-Field Stereo Matching}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In[] | |
import SimpleITK as sitk | |
import vtk | |
import numpy as np | |
import scipy as sp | |
from scipy.stats.mstats import mquantiles | |
import sys | |
from vtk.util.vtkConstants import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In[] | |
import gym | |
import numpy as np | |
np.set_printoptions(precision=3, suppress=True) | |
# In[] | |
def p_pp(policy): | |
mapping = { | |
0: '<', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In[] | |
import gym | |
import numpy as np | |
import theano | |
import theano.tensor as T | |
import lasagne | |
import sklearn.preprocessing | |
np.set_printoptions(precision=2) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In[] | |
import collections | |
import gym | |
import numpy as np | |
import math | |
# In[] | |
class DiscretePolicy(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In[] | |
class DiscretePolicy(object): | |
def __init__(self, env): | |
if not issubclass(type(env), gym.envs.toy_text.discrete.DiscreteEnv): | |
raise Exception('env should be subclass of gym.envs.toy_text.' | |
'discrete.DiscreteEnv') | |
self.env = env | |
self.policy = np.array([env.action_space.sample() for i in | |
range(self.env.nS)], | |
dtype=int) |
NewerOlder