Commit 815e9439 authored by Yuxin Wu's avatar Yuxin Wu

clean up some imports

parent 5713dcd1
......@@ -11,7 +11,6 @@ import tensorpack.tfutils.symbolic_functions as symbf
from tensorpack.tfutils.summary import add_moving_summary
import tensorflow as tf
from tensorflow.python.platform import flags
import tensorflow.contrib.slim as slim
from embedding_data import get_test_data, MnistPairs, MnistTriplets
......@@ -26,11 +25,11 @@ except ImportError:
MATPLOTLIB_AVAIBLABLE = False
FLAGS = flags.FLAGS
tf.app.flags.DEFINE_string('load', "", 'load model')
tf.app.flags.DEFINE_integer('gpu', 0, 'used gpu')
tf.app.flags.DEFINE_string('algorithm', "siamese", 'algorithm')
tf.app.flags.DEFINE_boolean('visualize', False, 'show embedding')
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_string('load', "", 'load model')
tf.flags.DEFINE_integer('gpu', 0, 'used gpu')
tf.flags.DEFINE_string('algorithm', "siamese", 'algorithm')
tf.flags.DEFINE_boolean('visualize', False, 'show embedding')
class EmbeddingModel(ModelDesc):
......
......@@ -4,7 +4,6 @@
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import tensorflow as tf
from tensorflow.python.training import training_util
from six.moves import map
from ..utils.argtools import graph_memoized
......@@ -67,7 +66,7 @@ def get_global_step_var():
trainable=False, dtype=tf.int64)
tf.add_to_collection(tf.GraphKeys.GLOBAL_STEP, var)
else:
var = training_util.get_or_create_global_step()
var = tf.train.get_or_create_global_step()
return var
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment