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
STEP: 0 | |
Matches 0.1003 | |
STEP: 100 | |
Matches 0.1003 | |
STEP: 200 | |
Matches 0.1048 |
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 numpy as np | |
import re | |
import itertools | |
from collections import Counter | |
def clean_str(string): | |
""" | |
Tokenization/string cleaning for all datasets except for SST. | |
Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py |
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
""" Auto Encoder Example. | |
Build a 2 layers auto-encoder with TensorFlow to compress images to a | |
lower latent space and then reconstruct them. | |
""" | |
from __future__ import division, print_function, absolute_import | |
import tensorflow as tf | |
import numpy as np |
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
#3 | |
# Parameters | |
learning_rate = 0.0001 # 3.a (0.001 changed to .0001) | |
training_iters = 15000 # 3.a (10000 changed to 15000) | |
display_step = 1200 # 3.a (1000 changed to 1200) | |
n_input = 4 # 3.a (3 changed to 4) | |
Iter= 1200, Average Loss= 8.120618, Average Accuracy= 3.50% | |
[';', 'then', 'she', 'looked'] - [at] vs [was] | |
Iter= 2400, Average Loss= 5.403042, Average Accuracy= 4.83% |
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
First run of CNNmodel.py (nothing changed) | |
step 0, training accuracy 0.18 | |
step 100, training accuracy 0.88 | |
step 200, training accuracy 0.94 | |
step 300, training accuracy 0.96 | |
step 400, training accuracy 0.92 | |
test accuracy 0.9433 | |
Time for building convnet: | |
103588 |
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
FIRST TEST (NO CHANGES) | |
2018-07-17T13:36:08.644717: step 1, loss 2.70243, acc 0.416667 | |
2018-07-17T13:36:08.729154: step 2, loss 1.44836, acc 0.722222 | |
2018-07-17T13:36:08.780371: step 3, loss 0.831631, acc 0.722222 | |
2018-07-17T13:36:08.834600: step 4, loss 0.780276, acc 0.638889 | |
2018-07-17T13:36:08.894865: step 5, loss 0.97322, acc 0.638889 | |
2018-07-17T13:36:08.956489: step 6, loss 0.754949, acc 0.75 | |
2018-07-17T13:36:09.007231: step 7, loss 0.949148, acc 0.75 | |
2018-07-17T13:36:09.065482: step 8, loss 0.449501, acc 0.833333 |
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 mpl_toolkits.mplot3d import Axes3D #required for 3d plotting mandatory | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
import xlrd | |
# Improvement to the Linear Regression and new Smoking data set | |
DATA_FILE = 'Smoking.xls' | |
# Step 1: read in data from the .xls file |
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 | |
# first approach is simple matrices using the tf.constant | |
# a,b,c are all 1x3 matrices, d is the calculated function | |
a = tf.constant([1, 2, 3, 1, 2, 3]) | |
b = tf.constant([3, 2, 1, 1, 2, 3]) | |
c = tf.constant([4, 5, 6, 1, 2, 3]) | |
d = (a*a + b) * c |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="jdk" jdkName="Python 3.6 (CS490)" jdkType="Python SDK" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
</module> |
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
�K" @D%��A | |
brain.Event:2M�3@\ �h& Z�oD%��A"�> | |
H | |
LowPlaceholder* | |
dtype0* | |
_output_shapes | |
:* | |
shape: | |
J | |
ClosePlaceholder* |
NewerOlder