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
0aa7446f
Commit
0aa7446f
authored
Feb 07, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start using pip to install
parent
8553816b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
24 deletions
+22
-24
.travis.yml
.travis.yml
+5
-8
README.md
README.md
+8
-11
docs/requirements.txt
docs/requirements.txt
+0
-1
examples/HED/README.md
examples/HED/README.md
+1
-1
setup.py
setup.py
+1
-0
tensorpack/tfutils/symbolic_functions.py
tensorpack/tfutils/symbolic_functions.py
+1
-0
tensorpack/train/base.py
tensorpack/train/base.py
+6
-3
No files found.
.travis.yml
View file @
0aa7446f
...
@@ -6,19 +6,15 @@ cache:
...
@@ -6,19 +6,15 @@ cache:
pip
:
true
pip
:
true
apt
:
true
apt
:
true
addons
:
apt
:
sources
:
ubuntu-toolchain-r-test
matrix
:
matrix
:
fast_finish
:
true
fast_finish
:
true
include
:
include
:
-
os
:
linux
-
os
:
linux
python
:
2.7
python
:
2.7
env
:
TF_VERSION=1.0.0rc
0
TF_TYPE=release
env
:
TF_VERSION=1.0.0rc
1
TF_TYPE=release
-
os
:
linux
-
os
:
linux
python
:
3.5
python
:
3.5
env
:
TF_VERSION=1.0.0rc
0
TF_TYPE=release
env
:
TF_VERSION=1.0.0rc
1
TF_TYPE=release
-
os
:
linux
-
os
:
linux
python
:
2.7
python
:
2.7
env
:
TF_VERSION=0.12.1 TF_TYPE=nightly
env
:
TF_VERSION=0.12.1 TF_TYPE=nightly
...
@@ -34,8 +30,9 @@ install:
...
@@ -34,8 +30,9 @@ install:
# Here we use opencv-python to overcome some travis probelms.
# Here we use opencv-python to overcome some travis probelms.
# Users are not recommended to use opencv-python because it brings issues working on GPU
# Users are not recommended to use opencv-python because it brings issues working on GPU
# together with tensorflow.
# together with tensorflow.
-
if [ -e requirements.txt ]; then pip install -r requirements.txt;else pip install -r requirements.pip;fi
#
- if [ -e requirements.txt ]; then pip install -r requirements.txt;else pip install -r requirements.pip;fi
-
./tests/install-tensorflow.sh
-
./tests/install-tensorflow.sh
-
pip install .
before_script
:
before_script
:
-
flake8 --version
-
flake8 --version
...
@@ -45,7 +42,7 @@ before_script:
...
@@ -45,7 +42,7 @@ before_script:
script
:
script
:
-
flake8 .
-
flake8 .
-
cd examples && flake8 .
-
cd examples && flake8 .
-
export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR
#
- export PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR
-
cd $TRAVIS_BUILD_DIR && python tests/test_examples.py
-
cd $TRAVIS_BUILD_DIR && python tests/test_examples.py
notifications
:
notifications
:
...
...
README.md
View file @
0aa7446f
...
@@ -54,20 +54,17 @@ With the above components defined, tensorpack trainer will run the training iter
...
@@ -54,20 +54,17 @@ With the above components defined, tensorpack trainer will run the training iter
Multi-GPU training is off-the-shelf by simply switching the trainer.
Multi-GPU training is off-the-shelf by simply switching the trainer.
You can also define your own trainer for non-standard training (e.g. GAN).
You can also define your own trainer for non-standard training (e.g. GAN).
## Dependencies:
## Install:
Dependencies:
+
Python 2 or 3
+
Python 2 or 3
+
TensorFlow >= 1.0.0rc0
+
TensorFlow >= 1.0.0rc0
+
Python bindings for OpenCV
+
Python bindings for OpenCV
+
other requirements:
+
(optional) use tcmalloc if running with large data
```
pip install --user -r requirements.txt
pip install --user -r opt-requirements.txt # (some optional dependencies required by certain submodule, you can install later if needed)
```
+
Enable
`import tensorpack`
:
```
```
export PYTHONPATH=$PYTHONPATH:`readlink -f path/to/tensorpack`
git clone https://github.com/ppwwyyxx/tensorpack/ && cd tensorpack
pip install --user --upgrade .
pip install --user -r opt-requirements.txt # (some optional dependencies required by certain submodules, you can install later if prompted)
```
```
(or use
`greadlink`
from
`coreutils`
brew package if you're on OSX)
+
Use tcmalloc if running with large data
docs/requirements.txt
View file @
0aa7446f
termcolor
termcolor
numpy
numpy
tqdm
tqdm
nltk
decorator
decorator
Sphinx==1.5.1
Sphinx==1.5.1
recommonmark==0.4.0
recommonmark==0.4.0
examples/HED/README.md
View file @
0aa7446f
...
@@ -39,5 +39,5 @@ To view the loss curve:
...
@@ -39,5 +39,5 @@ To view the loss curve:
```
bash
```
bash
cat
train_log/hed/stat.json | jq
'.[] |
cat
train_log/hed/stat.json | jq
'.[] |
"\(.xentropy1)\t\(.xentropy2)\t\(.xentropy3)\t\(.xentropy4)\t\(.xentropy5)\t\(.xentropy6)"'
-r
|
\
"\(.xentropy1)\t\(.xentropy2)\t\(.xentropy3)\t\(.xentropy4)\t\(.xentropy5)\t\(.xentropy6)"'
-r
|
\
../../scripts/plot-point.py
--legend
1,2,3,4,5,final
--decay
0.8
tpk-plot-point
--legend
1,2,3,4,5,final
--decay
0.8
```
```
setup.py
View file @
0aa7446f
...
@@ -48,6 +48,7 @@ for s in scripts:
...
@@ -48,6 +48,7 @@ for s in scripts:
setup
(
setup
(
version
=
__version__
,
version
=
__version__
,
install_requires
=
req
,
install_requires
=
req
,
tests_require
=
[
'flake8'
]
extras_require
=
{
extras_require
=
{
'all'
:
extra_req
'all'
:
extra_req
},
},
...
...
tensorpack/tfutils/symbolic_functions.py
View file @
0aa7446f
...
@@ -7,6 +7,7 @@ from contextlib import contextmanager
...
@@ -7,6 +7,7 @@ from contextlib import contextmanager
import
numpy
as
np
import
numpy
as
np
# this function exists for backwards-compatibilty
def
prediction_incorrect
(
logits
,
label
,
topk
=
1
,
name
=
'incorrect_vector'
):
def
prediction_incorrect
(
logits
,
label
,
topk
=
1
,
name
=
'incorrect_vector'
):
"""
"""
Args:
Args:
...
...
tensorpack/train/base.py
View file @
0aa7446f
...
@@ -155,9 +155,12 @@ class Trainer(object):
...
@@ -155,9 +155,12 @@ class Trainer(object):
@
property
@
property
def
global_step
(
self
):
def
global_step
(
self
):
return
self
.
_starting_step
+
\
try
:
self
.
config
.
steps_per_epoch
*
(
self
.
epoch_num
-
1
)
+
\
return
self
.
_starting_step
+
\
self
.
local_step
+
1
self
.
config
.
steps_per_epoch
*
(
self
.
epoch_num
-
1
)
+
\
self
.
local_step
+
1
except
AttributeError
:
return
get_global_step_value
()
def
main_loop
(
self
):
def
main_loop
(
self
):
"""
"""
...
...
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