Skip to content

Instantly share code, notes, and snippets.

STEP: 0
Matches 0.1003
STEP: 100
Matches 0.1003
STEP: 200
Matches 0.1048
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
""" 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
#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%
@parcmepperman
parcmepperman / result_dl_icp_6
Created July 19, 2018 17:53
Results DL Lab #6
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
@parcmepperman
parcmepperman / results.txt
Created July 17, 2018 18:39
RESULTS_DL_5
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
@parcmepperman
parcmepperman / DLICP_2_2.1.py
Created July 16, 2018 21:20
Deep Learingin ICP_2
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
@parcmepperman
parcmepperman / DLICP 1_DL 1.0.py
Created July 16, 2018 19:15
Deep Learning ICP 1
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
<?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>
�K" @D%��A
brain.Event:2M�3@\�h& Z�oD%��A"�>
H
Low Placeholder*
dtype0*
_output_shapes
:*
shape:
J
Close Placeholder*