This file contains 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
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import argparse | |
import sys | |
from tensorflow.examples.tutorials.mnist import input_data | |
import tensorflow as tf |
This file contains 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
import sys, os | |
sys.path.append(os.pardir) | |
from dataset.mnist import load_mnist | |
import tensorflow as tf | |
import numpy as np | |
(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True) |
This file contains 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
from keras.models import Sequential | |
from keras.layers import Dense, Activation | |
from keras.datasets import mnist | |
from keras.utils import np_utils | |
from keras.optimizers import SGD | |
model = Sequential() | |
(X_train, Y_train), (X_test, Y_test) = mnist.load_data() | |
X_train = X_train.reshape(-1, 28*28).astype('float32')/255 | |
Y_train = np_utils.to_categorical(Y_train, 10) |
This file contains 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
import nuimport numpy as np | |
import keras | |
from keras.models import Sequential | |
from keras.datasets import mnist | |
from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
from keras.layers.core import Dense, Activation, Dropout, Flatten | |
from keras.utils import np_utils | |
This file contains 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
from __future__ import print_function | |
import keras | |
from keras.datasets import cifar10 | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Activation, Flatten | |
from keras.layers import Convolution2D, Conv2D, MaxPooling2D | |
batch_size = 32 | |
num_classes = 10 |
This file contains 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
Require Import Bool. | |
Require Import Lists.List. | |
Require Import String. | |
Require Import Ascii. | |
Definition eqc (x y : ascii) : bool := | |
if ascii_dec x y | |
then true | |
else false. |