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
integer = 10 | |
floating_point = 10.5 | |
string1 = ‘hello python!’ | |
string2 = “hello python” | |
print( integer ) | |
print( floating_point ) | |
print( string1 ) | |
print( string2 ) |
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 tensorflow as tf | |
const = tf.constant("hello world") | |
print(const) |
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 tensorflow as tf | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
x = tf.placeholder(tf.int32) | |
a = tf.Variable(5) | |
b = tf.Variable(2) |
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 tensorflow as tf | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
samples = 1000 | |
data = [[float(i)*0.01] for i in range(-samples, samples)] | |
label = [[1 if i[0] > 2.5 else 0] for i in data] | |
x = tf.placeholder(tf.float32) | |
y_ = tf.placeholder(tf.float32) |
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 tensorflow as tf | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
samples = 1000 | |
up = [i for i in range(10)] | |
down = [9-i for i in range(10)] | |
data = [up if i%2 == 0 else down for i in range(samples)] | |
label = [[1] if i%2 == 0 else [0] for i in range(samples)] |
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 tensorflow as tf | |
samples = 1000 | |
up = [i for i in range(10)] | |
down = [9-i for i in range(10)] | |
data = [up if i%2 == 0 else down for i in range(samples)] | |
label = [[1] if i%2 == 0 else [0] for i in range(samples)] | |
tf.reset_default_graph() | |
x = tf.placeholder(tf.float32, shape=[None, 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
Train Dataset0 | |
https://drive.google.com/open?id=0B1UrJwDGWri2NHYtaDJUMEJrdHc | |
Label preprocessed | |
https://drive.google.com/open?id=0B1UrJwDGWri2UG1kV1JNSTBETTQ | |
cuDNN update | |
\\70.12.107.50\Users\student\Download\cudnn-8.0-windows10-x64-v5.1\cuda\ <<< copy | |
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\ <<< paste |
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 tensorflow as tf | |
import matplotlib.pyplot as plt | |
import os | |
%matplotlib inline | |
files = "dataset/test_dataset_png/" | |
file_dir = os.path.join(os.getcwd(), files) | |
filenames = [os.path.join(file_dir, f) for f in os.listdir(file_dir)] | |
filename_queue = tf.train.string_input_producer(filenames) |
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
dataset = tf.contrib.data.TextLineDataset(labelname).batch(10) | |
itr = dataset.make_one_shot_iterator() | |
batch = itr.get_next() | |
with tf.Session() as sess: | |
print(sess.run(batch)) |
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 tensorflow as tf | |
import matplotlib.pyplot as plt | |
import os | |
%matplotlib inline | |
images = "dataset/test_dataset_png/" | |
image_dir = os.path.join(os.getcwd(), images) | |
imagenames = [os.path.join(image_dir, f) for f in os.listdir(image_dir)] | |
label = "dataset/test_dataset_csv/label.csv" |