Skip to content

Instantly share code, notes, and snippets.

## Load Data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
# Build Computation Graph/Neural Net
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def bias_variable(shape):
dhruv13@da-lipmunk ~/Desktop/KDTree $ valgrind --show-reachable=yes --track-origins=yes --tool=memcheck --leak-check=yes ./obj
==24393== Memcheck, a memory error detector
==24393== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==24393== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==24393== Command: ./obj
==24393==
Inside
==24393==
==24393== HEAP SUMMARY:
==24393== in use at exit: 4,055 bytes in 72 blocks
@dhruv13J
dhruv13J / sg_nanoflann.cpp
Created March 15, 2014 14:14
Test for shogun-nanoflann integration
#include <shogun/features/DenseFeatures.h>
#include <shogun/lib/JLCoverTree.h>
#include <shogun/lib/nanoflann/nanoflann_shogun.h>
#include <iostream>
#include <shogun/distance/Distance.h>
#include <shogun/machine/DistanceMachine.h>
#include <shogun/lib/common.h>
#include <shogun/io/SGIO.h>
#include <shogun/features/Features.h>