Skip to content

Instantly share code, notes, and snippets.

// -*- coding: utf-8 -*-
#include <iostream>
#include <fstream>
#include <memory>
#include <vector>
#include <cassert>
#include <cstdint>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/gzip.hpp>
@saitodev
saitodev / deep_MNIST_for_experts.py
Created November 6, 2016 09:39
Tensorflow tutorial "Deep MNIST for Experts"
from __future__ import print_function
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
import tensorflow as tf
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
@saitodev
saitodev / MNIST_for_ML_beginners.py
Created November 6, 2016 09:17
Tensorflow tutorial "MNIST For ML Beginners"
from __future__ import print_function
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
import tensorflow as tf
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))