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
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("/tmp/mnist",one_hot=True) | |
n_nodes_hl1 = 500 | |
n_nodes_hl2 = 500 | |
n_nodes_hl3 = 500 | |
n_classes = 10 | |
batch_size = 100 |
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
""" | |
Author : Aditya Jain | |
Contact: [email protected] | |
""" | |
import matplotlib.pyplot as plt | |
from matplotlib import style | |
style.use('ggplot') | |
import numpy as np |
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
import numpy as np | |
from keras.models import Sequential | |
from keras.layers.core import Dense,Activation,Dropout | |
from keras.datasets import mnist | |
from keras.utils import np_utils | |
no_epochs = 30 | |
batch_size=150 #1000 | |
v_length = 784 |
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
# Mathieu Blondel, September 2010 | |
# License: BSD 3 clause | |
import numpy as np | |
from numpy import linalg | |
import cvxopt | |
import cvxopt.solvers | |
def linear_kernel(x1, x2): | |
return np.dot(x1, x2) |
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
import numpy as np | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers import Dense,Conv2D,MaxPooling2D | |
from keras.layers import Flatten,Dropout,Activation | |
#create a model | |
model = Sequential() | |
model.add(Conv2D(64,(5,5),input_shape=(28,28,1),data_format="channels_last",strides=(1,1),padding="valid",activation="relu")) |
NewerOlder