Skip to content

Commit 88aa39b

Browse files
zsdonghaolgarithm
authored andcommitted
New release (#811)
* lazy import nltk * lazy import cv2 * lazy import cv2 * Update nlp.py * Update package_info.py
1 parent 6bacee4 commit 88aa39b

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

tensorlayer/nlp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
from tensorflow.python.platform import gfile
2020

2121
import tensorlayer as tl
22+
from tensorlayer.lazy_imports import LazyImport
2223

23-
import nltk
24+
nltk = LazyImport("nltk")
2425

2526
__all__ = [
2627
'generate_skip_gram_batch',

tensorlayer/package_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""Deep learning and Reinforcement learning library for Researchers and Engineers"""
44

55
# Use the following formatting: (major, minor, patch, prerelease)
6-
VERSION = (1, 9, 1, "")
6+
VERSION = (1, 10, 0, "rc0")
77
__shortversion__ = '.'.join(map(str, VERSION[:3]))
88
__version__ = '.'.join(map(str, VERSION[:3])) + "".join(VERSION[3:])
99

@@ -16,4 +16,4 @@
1616
__description__ = 'Reinforcement Learning and Deep Learning Library for Researcher and Engineer.'
1717
__license__ = 'apache'
1818
__keywords__ = 'deep learning, machine learning, computer vision, nlp, '
19-
__keywords__ += 'supervised learning, unsupervised learning, reinforcement learning, tensorflow'
19+
__keywords__ += 'supervised learning, unsupervised learning, reinforcement learning, tensorflow'

tensorlayer/prepro.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
from skimage.morphology import binary_erosion as _binary_erosion
2929

3030
from six.moves import range
31-
31+
from tensorlayer.lazy_imports import LazyImport
3232
import PIL
33-
import cv2 #TODO Remove
33+
cv2 = LazyImport("cv2")
3434
import math
3535
import random
3636

tensorlayer/visualize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import numpy as np
99

1010
import tensorlayer as tl
11-
12-
import cv2
11+
from tensorlayer.lazy_imports import LazyImport
12+
cv2 = LazyImport("cv2")
1313

1414
# Uncomment the following line if you got: _tkinter.TclError: no display name and no $DISPLAY environment variable
1515
# import matplotlib

0 commit comments

Comments
 (0)