Commit e592271b authored by Yuxin Wu's avatar Yuxin Wu

update about version info

parent 004e3048
......@@ -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.10
+ TensorFlow >= 0.11
+ Python bindings for OpenCV
+ other requirements:
```
......
......@@ -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:
......
......@@ -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):
......
......@@ -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:
......
......@@ -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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment