Skip to content

Instantly share code, notes, and snippets.

Joon Myeongjoon

Block or report user

Report or block Myeongjoon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Myeongjoon
Myeongjoon / AdAccount.cs
Created Dec 24, 2018
ExampleValueObject
View AdAccount.cs
public class AdAccount : ValueObject
{
private AdAccount()
{
}
public static AdAccount For(string accountString)
{
var account = new AdAccount();
View rnn_mnist_05_builtin.py
rnn_cell = tf.contrib.rnn.BasicRNNCell(hidden_layer_size)
outputs, _ = tf.nn.dynamic_rnn(rnn_cell, _inputs, dtype=tf.float32)
View rnn_minist_04_train_and_test.py
# Merge all the summaries
merged = tf.summary.merge_all()
# Get a small test set
test_data = mnist.test.images[:batch_size].reshape((-1, time_steps, element_size))
test_label = mnist.test.labels[:batch_size]
with tf.Session() as sess:
# Write summaries to LOG_DIR -- used by TensorBoard
train_writer = tf.summary.FileWriter(LOG_DIR + '/train',
View rnn_minist_03_outputs.py
# Weights for output layers
with tf.name_scope('linear_layer_weights') as scope:
with tf.name_scope("W_linear"):
Wl = tf.Variable(tf.truncated_normal([hidden_layer_size, num_classes],
mean=0, stddev=.01))
variable_summaries(Wl)
with tf.name_scope("Bias_linear"):
bl = tf.Variable(tf.truncated_normal([num_classes],
mean=0, stddev=.01))
variable_summaries(bl)
View rnn_minist_02_states.py
# Weights and bias for input and hidden layer
with tf.name_scope('rnn_weights'):
with tf.name_scope("W_x"):
Wx = tf.Variable(tf.zeros([element_size, hidden_layer_size]))
variable_summaries(Wx)
with tf.name_scope("W_h"):
Wh = tf.Variable(tf.zeros([hidden_layer_size, hidden_layer_size]))
variable_summaries(Wh)
with tf.name_scope("Bias"):
b_rnn = tf.Variable(tf.zeros([hidden_layer_size]))
View rnn_minist_01_input.py
from __future__ import print_function
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
element_size = 28
time_steps = 28
num_classes = 10
batch_size = 128
You can’t perform that action at this time.