diff --git a/base_network.py b/base_network.py index 95b9b8a..4e42dd5 100644 --- a/base_network.py +++ b/base_network.py @@ -66,7 +66,7 @@ def hidden_layers_starting_at(self, layer, layer_sizes, opts=None): num_outputs=size, weights_regularizer=tf.contrib.layers.l2_regularizer(0.01), activation_fn=tf.nn.relu) - if opts.use_dropout: + if opts!=None and opts.use_dropout: layer = slim.dropout(layer, is_training=IS_TRAINING, scope="do%d" % i) return layer diff --git a/event_log.py b/event_log.py index 6d34753..4a038d5 100755 --- a/event_log.py +++ b/event_log.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -import event_pb2 +from tensorflow.core.util import event_pb2 import gzip import matplotlib.pyplot as plt import numpy as np