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
7af96dea
Commit
7af96dea
authored
Feb 26, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use static hacks on if False (#656)
parent
afa11399
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
58 additions
and
18 deletions
+58
-18
.github/ISSUE_TEMPLATE.md
.github/ISSUE_TEMPLATE.md
+11
-6
docs/tutorial/efficient-dataflow.md
docs/tutorial/efficient-dataflow.md
+1
-1
tensorpack/__init__.py
tensorpack/__init__.py
+6
-1
tensorpack/callbacks/__init__.py
tensorpack/callbacks/__init__.py
+4
-1
tensorpack/dataflow/__init__.py
tensorpack/dataflow/__init__.py
+4
-1
tensorpack/dataflow/dataset/__init__.py
tensorpack/dataflow/dataset/__init__.py
+4
-1
tensorpack/dataflow/imgaug/__init__.py
tensorpack/dataflow/imgaug/__init__.py
+4
-1
tensorpack/graph_builder/__init__.py
tensorpack/graph_builder/__init__.py
+4
-1
tensorpack/input_source/__init__.py
tensorpack/input_source/__init__.py
+4
-1
tensorpack/models/__init__.py
tensorpack/models/__init__.py
+4
-1
tensorpack/predict/__init__.py
tensorpack/predict/__init__.py
+4
-1
tensorpack/tfutils/__init__.py
tensorpack/tfutils/__init__.py
+4
-1
tensorpack/train/__init__.py
tensorpack/train/__init__.py
+4
-1
No files found.
.github/ISSUE_TEMPLATE.md
View file @
7af96dea
Potential Bugs/Feature Requests/Usage Questions Only:
Potential Bugs/Feature Requests/Usage Questions Only:
Any unexpected problems:
PLEASE always include
Any unexpected problems:
__PLEASE ALWAYS INCLUDE__:
1.
What you did:
1.
What you did:
+
If you're using examples:
+
If you're using examples:
+
What's the command you run:
+
What's the command you run:
+
Have you made any changes to code? Post them if any:
+
Have you made any changes to code? Paste them if any:
+
If not, describe what you did that may be relevant.
+
If not, tell us what you did that may be relevant.
But we may not be able to resolve it since there is no reproducible code.
But we may not be able to resolve it if there is no reproducible code.
2.
What you observed, e.g. as much as logs possible.
+
Better to paste what you did instead of describing them.
2.
What you observed, e.g. as much logs as possible.
+
Better to paste what you observed instead of describing them.
3.
What you expected, if not obvious.
3.
What you expected, if not obvious.
4.
Your environment (TF version, tensorpack version, cudnn version, number & type of GPUs), if it matters.
4.
Your environment:
+
Python version.
+
TF version:
`python -c 'import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)'`
.
+
Tensorpack version:
`python3 -c 'import tensorpack; print(tensorpack.__version__)'`
. You can install Tensorpack master by
`pip install -U git+https://github.com/ppwwyyxx/tensorpack.git`
.
5.
About efficiency, PLEASE first read http://tensorpack.readthedocs.io/en/latest/tutorial/performance-tuning.html
5.
About efficiency, PLEASE first read http://tensorpack.readthedocs.io/en/latest/tutorial/performance-tuning.html
Feature Requests:
Feature Requests:
...
...
docs/tutorial/efficient-dataflow.md
View file @
7af96dea
...
@@ -147,7 +147,7 @@ class BinaryILSVRC12(dataset.ILSVRC12Files):
...
@@ -147,7 +147,7 @@ class BinaryILSVRC12(dataset.ILSVRC12Files):
jpeg
=
f
.
read
()
jpeg
=
f
.
read
()
jpeg
=
np
.
asarray
(
bytearray
(
jpeg
),
dtype
=
'uint8'
)
jpeg
=
np
.
asarray
(
bytearray
(
jpeg
),
dtype
=
'uint8'
)
yield
[
jpeg
,
label
]
yield
[
jpeg
,
label
]
ds0
=
BinaryILSVRC12
()
ds0
=
BinaryILSVRC12
(
'/path/to/ILSVRC/'
,
'train'
)
ds1
=
PrefetchDataZMQ
(
ds0
,
nr_proc
=
1
)
ds1
=
PrefetchDataZMQ
(
ds0
,
nr_proc
=
1
)
dftools
.
dump_dataflow_to_lmdb
(
ds1
,
'/path/to/ILSVRC-train.lmdb'
)
dftools
.
dump_dataflow_to_lmdb
(
ds1
,
'/path/to/ILSVRC-train.lmdb'
)
```
```
...
...
tensorpack/__init__.py
View file @
7af96dea
...
@@ -10,7 +10,12 @@ from tensorpack.utils import *
...
@@ -10,7 +10,12 @@ from tensorpack.utils import *
from
tensorpack.dataflow
import
*
from
tensorpack.dataflow
import
*
# dataflow can be used alone without installing tensorflow
# dataflow can be used alone without installing tensorflow
if
_HAS_TF
:
# TODO maybe separate dataflow to a new project if it's good enough
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
_HAS_TF
if
STATICA_HACK
:
from
tensorpack.models
import
*
from
tensorpack.models
import
*
from
tensorpack.callbacks
import
*
from
tensorpack.callbacks
import
*
...
...
tensorpack/callbacks/__init__.py
View file @
7af96dea
...
@@ -2,7 +2,10 @@
...
@@ -2,7 +2,10 @@
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.base
import
*
from
.base
import
*
from
.concurrency
import
*
from
.concurrency
import
*
from
.graph
import
*
from
.graph
import
*
...
...
tensorpack/dataflow/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.base
import
*
from
.base
import
*
from
.common
import
*
from
.common
import
*
from
.format
import
*
from
.format
import
*
...
...
tensorpack/dataflow/dataset/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.bsds500
import
*
from
.bsds500
import
*
from
.cifar
import
*
from
.cifar
import
*
from
.ilsvrc
import
*
from
.ilsvrc
import
*
...
...
tensorpack/dataflow/imgaug/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.base
import
*
from
.base
import
*
from
.convert
import
*
from
.convert
import
*
from
.crop
import
*
from
.crop
import
*
...
...
tensorpack/graph_builder/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.model_desc
import
*
from
.model_desc
import
*
from
.training
import
*
from
.training
import
*
from
.distributed
import
*
from
.distributed
import
*
...
...
tensorpack/input_source/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.input_source_base
import
*
from
.input_source_base
import
*
from
.input_source
import
*
from
.input_source
import
*
...
...
tensorpack/models/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.batch_norm
import
*
from
.batch_norm
import
*
from
.common
import
*
from
.common
import
*
from
.conv2d
import
*
from
.conv2d
import
*
...
...
tensorpack/predict/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.base
import
*
from
.base
import
*
from
.concurrency
import
*
from
.concurrency
import
*
from
.config
import
*
from
.config
import
*
...
...
tensorpack/tfutils/__init__.py
View file @
7af96dea
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
from
.tower
import
get_current_tower_context
,
TowerContext
from
.tower
import
get_current_tower_context
,
TowerContext
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.common
import
*
from
.common
import
*
from
.sessinit
import
*
from
.sessinit
import
*
from
.argscope
import
*
from
.argscope
import
*
...
...
tensorpack/train/__init__.py
View file @
7af96dea
# -*- coding: UTF-8 -*-
# -*- coding: UTF-8 -*-
# File: __init__.py
# File: __init__.py
if
False
:
# https://github.com/celery/kombu/blob/7d13f9b95d0b50c94393b962e6def928511bfda6/kombu/__init__.py#L34-L36
STATICA_HACK
=
True
globals
()[
'kcah_acitats'
[::
-
1
]
.
upper
()]
=
False
if
STATICA_HACK
:
from
.base
import
*
from
.base
import
*
from
.config
import
*
from
.config
import
*
from
.interface
import
*
from
.interface
import
*
...
...
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