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
817cd080
Commit
817cd080
authored
Mar 21, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move loadcaffe to utils
parent
d1cfdd4d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
30 deletions
+6
-30
tensorpack/dataflow/dataset/.gitignore
tensorpack/dataflow/dataset/.gitignore
+1
-0
tensorpack/utils/__init__.py
tensorpack/utils/__init__.py
+5
-30
tensorpack/utils/loadcaffe.py
tensorpack/utils/loadcaffe.py
+0
-0
No files found.
tensorpack/dataflow/dataset/.gitignore
View file @
817cd080
mnist_data
cifar10_data
svhn_data
tensorpack/utils/__init__.py
View file @
817cd080
...
...
@@ -4,8 +4,11 @@
from
pkgutil
import
walk_packages
import
os
import
tensorflow
as
tf
import
numpy
as
np
"""
Common utils.
These utils should be irrelevant to tensorflow.
"""
def
global_import
(
name
):
p
=
__import__
(
name
,
globals
(),
None
,
level
=
1
)
...
...
@@ -13,32 +16,4 @@ def global_import(name):
for
k
in
lst
:
globals
()[
k
]
=
p
.
__dict__
[
k
]
global_import
(
'naming'
)
#global_import('sessinit')
global_import
(
'utils'
)
# TODO move this utils to another file
#def get_default_sess_config(mem_fraction=0.5):
#"""
#Return a better config to use as default.
#Tensorflow default session config consume too much resources
#"""
#conf = tf.ConfigProto()
#conf.gpu_options.per_process_gpu_memory_fraction = mem_fraction
#conf.gpu_options.allocator_type = 'BFC'
#conf.allow_soft_placement = True
#return conf
#def get_global_step_var():
#""" get global_step variable in the current graph"""
#try:
#return tf.get_default_graph().get_tensor_by_name(GLOBAL_STEP_VAR_NAME)
#except KeyError:
#var = tf.Variable(
#0, trainable=False, name=GLOBAL_STEP_OP_NAME)
#return var
#def get_global_step():
#""" get global_step value with current graph and session"""
#return tf.train.global_step(
#tf.get_default_session(),
#get_global_step_var())
tensorpack/
tf
utils/loadcaffe.py
→
tensorpack/utils/loadcaffe.py
View file @
817cd080
File moved
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