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
e592271b
Commit
e592271b
authored
Dec 08, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update about version info
parent
004e3048
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
README.md
README.md
+2
-2
examples/GAN/Image2Image.py
examples/GAN/Image2Image.py
+3
-2
tensorpack/callbacks/stats.py
tensorpack/callbacks/stats.py
+0
-3
tensorpack/tfutils/summary.py
tensorpack/tfutils/summary.py
+1
-0
tensorpack/train/base.py
tensorpack/train/base.py
+3
-0
No files found.
README.md
View file @
e592271b
...
...
@@ -2,7 +2,7 @@
Neural Network Toolbox on TensorFlow
See some
[
examples
](
examples
)
to learn about the framework.
You can train them and reproduce the performance... not just to see how to write code
.
They're not only for demonstration of the framework -- you can train them and reproduce the results in papers
.
+
[
DoReFa-Net: training binary / low bitwidth CNN on ImageNet
](
examples/DoReFa-Net
)
+
[
ResNet for ImageNet/Cifar10/SVHN classification
](
examples/ResNet
)
...
...
@@ -44,7 +44,7 @@ The components are designed to be independent. You can use Model or DataFlow in
## Dependencies:
+
Python 2 or 3
+
TensorFlow >= 0.1
0
+
TensorFlow >= 0.1
1
+
Python bindings for OpenCV
+
other requirements:
```
...
...
examples/GAN/Image2Image.py
View file @
e592271b
...
...
@@ -19,7 +19,7 @@ from GAN import GANTrainer, RandomZData, build_GAN_losses
"""
To train:
./Image2Image.py --data /path/to/datadir --mode {AtoB,BtoA}
# datadir should contain
512x256 images
formed by A and B
# datadir should contain
images of shpae 2s x s,
formed by A and B
# training visualization will appear be in tensorboard
To visualize on test set:
...
...
@@ -128,7 +128,8 @@ def split_input(img):
img: an 512x256x3 image
:return: [input, output]
"""
input
,
output
=
img
[:,:
256
,:],
img
[:,
256
:,:]
s
=
img
.
shape
[
0
]
input
,
output
=
img
[:,:
s
,:],
img
[:,
s
:,:]
if
args
.
mode
==
'BtoA'
:
input
,
output
=
output
,
input
if
IN_CH
==
1
:
...
...
tensorpack/callbacks/stats.py
View file @
e592271b
...
...
@@ -40,9 +40,6 @@ class StatHolder(object):
:param k: name
:param v: value
"""
suffix
=
'-summary'
if
k
.
endswith
(
suffix
):
k
=
k
[:
-
len
(
suffix
)]
self
.
stat_now
[
k
]
=
float
(
v
)
def
set_print_tag
(
self
,
print_tag
):
...
...
tensorpack/tfutils/summary.py
View file @
e592271b
...
...
@@ -34,6 +34,7 @@ def add_activation_summary(x, name=None):
if
ctx
is
not
None
and
not
ctx
.
is_main_training_tower
:
return
ndim
=
x
.
get_shape
()
.
ndims
# TODO use scalar if found ndim == 1
assert
ndim
>=
2
,
\
"Summary a scalar with histogram? Maybe use scalar instead. FIXME!"
if
name
is
None
:
...
...
tensorpack/train/base.py
View file @
e592271b
...
...
@@ -91,6 +91,9 @@ class Trainer(object):
for
val
in
summary
.
value
:
if
val
.
WhichOneof
(
'value'
)
==
'simple_value'
:
val
.
tag
=
re
.
sub
(
'tower[p0-9]+/'
,
''
,
val
.
tag
)
# TODO move to subclasses
suffix
=
'-summary'
# issue#6150
if
val
.
tag
.
endswith
(
suffix
):
val
.
tag
=
va
.
tag
[:
-
len
(
suffix
)]
self
.
stat_holder
.
add_stat
(
val
.
tag
,
val
.
simple_value
)
self
.
summary_writer
.
add_summary
(
summary
,
get_global_step
())
...
...
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