def __init__(self, layers, batch_size, activation_func=tf.nn.sigmoid, saved_graph=None, sess=None, learning_rate=0.0001, batch_norm=False):
"""
@param layers is a list of integers, determining the amount of layers and their size
starting with the input size
"""
if len(layers) < 2:
print("Amount of layers must be greater than 1")
exit(0)
self.batch_size = batch_size
self.learning_rate = learning_rate
self.activation_func = activation_func
self.batch_norm = batch_norm
self.is_training = True
# Use this in data preprocessing
self.layers = layers
self._make_graph(layers)
if saved_graph is not None and sess is not None:
self.import_from_file(sess, saved_graph)
评论列表
文章目录