Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
815e9439
You need to sign in or sign up before continuing.
Commit
815e9439
authored
Jun 06, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up some imports
parent
5713dcd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
examples/SimilarityLearning/mnist-embeddings.py
examples/SimilarityLearning/mnist-embeddings.py
+5
-6
tensorpack/tfutils/common.py
tensorpack/tfutils/common.py
+1
-2
No files found.
examples/SimilarityLearning/mnist-embeddings.py
View file @
815e9439
...
@@ -11,7 +11,6 @@ import tensorpack.tfutils.symbolic_functions as symbf
...
@@ -11,7 +11,6 @@ import tensorpack.tfutils.symbolic_functions as symbf
from
tensorpack.tfutils.summary
import
add_moving_summary
from
tensorpack.tfutils.summary
import
add_moving_summary
import
tensorflow
as
tf
import
tensorflow
as
tf
from
tensorflow.python.platform
import
flags
import
tensorflow.contrib.slim
as
slim
import
tensorflow.contrib.slim
as
slim
from
embedding_data
import
get_test_data
,
MnistPairs
,
MnistTriplets
from
embedding_data
import
get_test_data
,
MnistPairs
,
MnistTriplets
...
@@ -26,11 +25,11 @@ except ImportError:
...
@@ -26,11 +25,11 @@ except ImportError:
MATPLOTLIB_AVAIBLABLE
=
False
MATPLOTLIB_AVAIBLABLE
=
False
FLAGS
=
flags
.
FLAGS
FLAGS
=
tf
.
flags
.
FLAGS
tf
.
app
.
flags
.
DEFINE_string
(
'load'
,
""
,
'load model'
)
tf
.
flags
.
DEFINE_string
(
'load'
,
""
,
'load model'
)
tf
.
app
.
flags
.
DEFINE_integer
(
'gpu'
,
0
,
'used gpu'
)
tf
.
flags
.
DEFINE_integer
(
'gpu'
,
0
,
'used gpu'
)
tf
.
app
.
flags
.
DEFINE_string
(
'algorithm'
,
"siamese"
,
'algorithm'
)
tf
.
flags
.
DEFINE_string
(
'algorithm'
,
"siamese"
,
'algorithm'
)
tf
.
app
.
flags
.
DEFINE_boolean
(
'visualize'
,
False
,
'show embedding'
)
tf
.
flags
.
DEFINE_boolean
(
'visualize'
,
False
,
'show embedding'
)
class
EmbeddingModel
(
ModelDesc
):
class
EmbeddingModel
(
ModelDesc
):
...
...
tensorpack/tfutils/common.py
View file @
815e9439
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import
tensorflow
as
tf
import
tensorflow
as
tf
from
tensorflow.python.training
import
training_util
from
six.moves
import
map
from
six.moves
import
map
from
..utils.argtools
import
graph_memoized
from
..utils.argtools
import
graph_memoized
...
@@ -67,7 +66,7 @@ def get_global_step_var():
...
@@ -67,7 +66,7 @@ def get_global_step_var():
trainable
=
False
,
dtype
=
tf
.
int64
)
trainable
=
False
,
dtype
=
tf
.
int64
)
tf
.
add_to_collection
(
tf
.
GraphKeys
.
GLOBAL_STEP
,
var
)
tf
.
add_to_collection
(
tf
.
GraphKeys
.
GLOBAL_STEP
,
var
)
else
:
else
:
var
=
t
raining_util
.
get_or_create_global_step
()
var
=
t
f
.
train
.
get_or_create_global_step
()
return
var
return
var
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment