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
# [filter size, stride, padding] | |
#Assume the two dimensions are the same | |
#Each kernel requires the following parameters: | |
# - k_i: kernel size | |
# - s_i: stride | |
# - p_i: padding (if padding is uneven, right padding will higher than left padding; "SAME" option in tensorflow) | |
# | |
#Each layer i requires the following parameters to be fully represented: | |
# - n_i: number of feature (data layer has n_1 = imagesize ) | |
# - j_i: distance (projected to image pixel distance) between center of two adjacent features |
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
# use the following snippet in your ipython notebook shell | |
import argparse | |
import tensorflow as tf | |
tf.app.flags.FLAGS = tf.python.platform.flags._FlagValues() | |
tf.app.flags._global_parser = argparse.ArgumentParser() |
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
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |