Skip to content

Instantly share code, notes, and snippets.

View joeyism's full-sized avatar

Joey joeyism

View GitHub Profile
import numpy as np
import pickle
import os
import math
def __extract_file__(fname):
with open(fname, 'rb') as fo:
d = pickle.load(fo, encoding='bytes')
return d
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
import tensorflow as tf
n_classes = 10
image_size = 32
dropout = tf.placeholder(tf.float32, name="dropout_rate")
input_images = tf.placeholder(tf.float32,
shape=[None, image_size, image_size, 3],
name="input_images")
import tensorflow as tf
n_classes = 10
image_size = 32
dropout = tf.placeholder(tf.float32, name="dropout_rate")
input_images = tf.placeholder(tf.float32,
shape=[None, image_size, image_size, 3],
name="input_images")
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
dropout_rate = 0.8
import numpy as np
import pickle
import os
import math
def __extract_file__(fname):
with open(fname, 'rb') as fo:
d = pickle.load(fo, encoding='bytes')
return d
import tensorflow as tf
n_classes = 10
image_size = 32
dropout = tf.placeholder(tf.float32, name="dropout_rate")
input_images = tf.placeholder(tf.float32,
shape=[None, image_size, image_size, 3],
name="input_images")
from numpy import *
import tensorflow as tf
image_size = 224
train_x = zeros((1, image_size, image_size ,3)).astype(float32)
xdim = train_x.shape[1:]
net_data = load(open("pretrained/bvlc_alexnet.npy", "rb"), encoding="latin1").item()
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):
import numpy as np
import pickle
import os
import math
def __extract_file__(fname):
with open(fname, 'rb') as fo:
d = pickle.load(fo, encoding='bytes')
return d