I hereby claim:
- I am sunsided on github.
- I am sunside (https://keybase.io/sunside) on keybase.
- I have a public key whose fingerprint is 808E 4A07 72DF 6180 5D0F F445 5A01 1B8A 8E78 85DC
To claim this, I am signing this object:
// A header file to get you set going with Intel SIMD instrinsic programming. | |
// All necessary header files are inlucded for SSE2, SSE41, and AVX2 | |
// Macros make the intrinsics easier to read and generic so you can compile to | |
// SSE2 or AVX2 with the flip of a #define | |
#define SSE2 //indicates we want SSE2 | |
#define SSE41 //indicates we want SSE4.1 instructions (floor and blend is available) | |
#define AVX2 //indicates we want AVX2 instructions (double speed!) |
# Typical setup to include TensorFlow. | |
import tensorflow as tf | |
# Make a queue of file names including all the JPEG images files in the relative | |
# image directory. | |
filename_queue = tf.train.string_input_producer( | |
tf.train.match_filenames_once("./images/*.jpg")) | |
# Read an entire image file which is required since they're JPEGs, if the images | |
# are too large they could be split in advance to smaller files or use the Fixed |
I hereby claim:
To claim this, I am signing this object:
// From http://stackoverflow.com/questions/9128519/reading-many-values-from-numpy-c-api | |
/* | |
Make | |
g++ -o matrix_multiply.o -c matrix_multiply.cpp -I{python include file for numpy/noprefix.h} -I{python include} -fPIC -O2 -Wno-deprecated -Wno-write-strings | |
g++ -o matrix_multiply.so -shared matrix_multiply.o -L{boost lib path} -lz -lm -ldl -lpthread -boost_python | |
Python code: | |
import numpy | |
import matrix_multiply |
""" Deep Auto-Encoder implementation | |
An auto-encoder works as follows: | |
Data of dimension k is reduced to a lower dimension j using a matrix multiplication: | |
softmax(W*x + b) = x' | |
where W is matrix from R^k --> R^j | |
A reconstruction matrix W' maps back from R^j --> R^k |
import numpy as np | |
import tensorflow as tf | |
# N, size of matrix. R, rank of data | |
N = 100 | |
R = 5 | |
# generate data | |
W_true = np.random.randn(N,R) | |
C_true = np.random.randn(R,N) |
import numpy as np | |
import tensorflow as tf | |
# N, size of matrix. R, rank of data | |
N = 100 | |
R = 5 | |
# generate data | |
W_true = np.random.randn(N,R) | |
C_true = np.random.randn(R,N) |
// memdjpeg - A super simple example of how to decode a jpeg in memory | |
// Kenneth Finnegan, 2012 | |
// blog.thelifeofkenneth.com | |
// | |
// After installing jpeglib, compile with: | |
// cc memdjpeg.c -ljpeg -o memdjpeg | |
// | |
// Run with: | |
// ./memdjpeg filename.jpg | |
// |
def execfile(filename, globals=None, locals=None): | |
# http://stackoverflow.com/a/6357418/195651 | |
exec(compile(open(filename, "rb").read(), filename, 'exec'), globals, locals) |