Skip to content

Commit 598c13a

Browse files
Merge branch 'master' into patch-1
2 parents 5d90285 + 65e4029 commit 598c13a

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
# built documents.
6868
#
6969
# The short X.Y version.
70-
version = '1.8.4rc1'
70+
version = '1.8.4'
7171
# The full version, including alpha/beta/rc tags.
72-
release = '1.8.4rc1'
72+
release = '1.8.4'
7373

7474
# The language for content autogenerated by Sphinx. Refer to documentation
7575
# for a list of supported languages.
@@ -143,7 +143,7 @@
143143
# The name for this set of Sphinx documents.
144144
# "<project> v<release> documentation" by default.
145145
#
146-
# html_title = 'TensorLayer v1.8.4rc1'
146+
# html_title = 'TensorLayer v1.8.4'
147147

148148
# A shorter title for the navigation bar. Default is the same as html_title.
149149
#

example/tutorial_tf_dataset_voc.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def _data_aug_fn(im, ann):
4141
ann = ann.decode()
4242
ann = tl.prepro.parse_darknet_ann_str_to_list(ann)
4343
clas, coords = tl.prepro.parse_darknet_ann_list_to_cls_box(ann)
44-
## random brightness, contrast and saturation
45-
im = tl.prepro.brightness(im, gamma=0.5, gain=1, is_random=True)
44+
## random brightness, contrast and saturation (tf.image API is faster)
45+
# im = tl.prepro.brightness(im, gamma=0.5, gain=1, is_random=True)
4646
# im = tl.prepro.illumination(im, gamma=(0.5, 1.5),
4747
# contrast=(0.5, 1.5), saturation=(0.5, 1.5), is_random=True) # TypeError: Cannot handle this data type
4848
## random horizontal flip
@@ -65,7 +65,12 @@ def _map_fn(filename, annotation):
6565
image = tf.read_file(filename)
6666
image = tf.image.decode_jpeg(image, channels=3)
6767
image = tf.image.convert_image_dtype(image, dtype=tf.float32)
68-
## data augmentation
68+
## data augmentation for image only 0.02s
69+
image = tf.image.random_brightness(image, max_delta=63)
70+
image = tf.image.random_contrast(image, lower=0.2, upper=1.8)
71+
# subtract off the mean and divide by the variance of the pixels. (optional)
72+
# img = tf.image.per_image_standardization(img)
73+
## data augmentation for image and bounding box
6974
image, annotation = tf.py_func(_data_aug_fn, [image, annotation], [tf.float32, tf.string])
7075
return image, annotation
7176

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="tensorlayer",
13-
version="1.8.4rc1",
13+
version="1.8.4",
1414
include_package_data=True,
1515
author='TensorLayer Contributors',
1616
author_email='[email protected]',

tensorlayer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
act = activation
2525
vis = visualize
2626

27-
__version__ = "1.8.4rc1"
27+
__version__ = "1.8.4"
2828

2929
global_flag = {}
3030
global_dict = {}

0 commit comments

Comments
 (0)