from collections import namedtuple import glob from iris import log # Total guess based on the rule of thumb from this question: # http://stackoverflow.com/questions/10565868/multi-layer-perceptron-mlp-architecture-criteria-for-choosing-number-of-hidde NUM_HIDDEN = 21 # Sepal Length, Sepal Width, Petal Length and Petal Width == 4 features. NUM_FEATURES = 4 # Iris-setosa, Iris-versicolor and Iris-virginica == 3 NUM_LABELS = 3 _logger = log.get_logger() # Data structure used to keep track of important parameters used in training our # model. Topology = namedtuple("Topology", "x y t w_hidden b_hidden hidden w_out b_out") def generate_weight(shape, name): """ TF variable filled with random values which follow a normal distribution. Parameters ---------- shape : 1-D Tensor or Array Corresponds to the shape parameter of tf.random_normal. name : str
from collections import namedtuple import glob from iris import log # Total guess based on the rule of thumb from this question: # http://stackoverflow.com/questions/10565868/multi-layer-perceptron-mlp-architecture-criteria-for-choosing-number-of-hidde NUM_HIDDEN = 21 # Sepal Length, Sepal Width, Petal Length and Petal Width == 4 features. NUM_FEATURES = 4 # Iris-setosa, Iris-versicolor and Iris-virginica == 3 NUM_LABELS = 3 _logger = log.get_logger() # Data structure used to keep track of important parameters used in training our # model. Topology = namedtuple( "Topology", "x y t w_hidden b_hidden hidden w_out b_out") def generate_weight(shape, name): """ TF variable filled with random values which follow a normal distribution. Parameters ---------- shape : 1-D Tensor or Array