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 | |
image_size = 32 | |
input_images = tf.placeholder(tf.float32, | |
shape=[None, image_size, image_size, 3], | |
name="input_images") | |
# First CONV layer | |
kernel = tf.Variable(tf.truncated_normal([11, 11, 3, 96], | |
dtype=tf.float32, |
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 | |
image_size = 32 | |
input_images = tf.placeholder(tf.float32, | |
shape=[None, image_size, image_size, 3], | |
name="input_images") | |
# First CONV layer | |
kernel = tf.Variable(tf.truncated_normal([11, 11, 3, 96], | |
dtype=tf.float32, |
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 | |
image_size = 32 | |
input_images = tf.placeholder(tf.float32, | |
shape=[None, image_size, image_size, 3], | |
name="input_images") | |
# First CONV layer | |
kernel = tf.Variable(tf.truncated_normal([11, 11, 3, 96], | |
dtype=tf.float32, |
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 | |
n_classes = 10 # <-- newly added constant | |
image_size = 32 | |
input_images = tf.placeholder(tf.float32, | |
shape=[None, image_size, image_size, 3], | |
name="input_images") | |
# First CONV layer |
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
from cifar import Cifar | |
import tensorflow as tf | |
import model | |
learning_rate = 0.001 | |
y = tf.placeholder(tf.float32, [None, model.n_classes]) | |
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits( | |
logits=model.out, | |
labels=y)) |
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
from cifar import Cifar | |
from tqdm import tqdm | |
import tensorflow as tf | |
import model | |
import helper | |
learning_rate = 0.001 | |
batch_size = 16 | |
no_of_epochs = 10 |
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 | |
def __one_hot__(num, dim=1000): | |
vec = np.zeros(dim) | |
vec[num] = 1 | |
return vec | |
def transform_to_input_output(input_output, dim=1000): |
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
from cifar import Cifar | |
from tqdm import tqdm | |
import tensorflow as tf | |
import model | |
import helper | |
learning_rate = 0.001 | |
batch_size = 16 | |
no_of_epochs = 10 |
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
from cifar import Cifar | |
from tqdm import tqdm | |
import tensorflow as tf | |
import model | |
import helper | |
learning_rate = 0.001 | |
batch_size = 16 | |
no_of_epochs = 10 |
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
from cifar import Cifar | |
from tqdm import tqdm | |
import tensorflow as tf | |
import model | |
import helper | |
learning_rate = 0.001 | |
batch_size = 16 | |
no_of_epochs = 10 |