Skip to content

Commit 83c79fb

Browse files
authored
Merge pull request #325 from tensorlayer/imports
clean unused imports.
2 parents fe56890 + 0b6993f commit 83c79fb

25 files changed

+13
-94
lines changed

tensorlayer/cost.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
# -*- coding: utf-8 -*-
22

33
import logging
4-
import numbers
54

65
import tensorflow as tf
7-
from tensorflow.python.framework import ops
8-
from tensorflow.python.ops import standard_ops
9-
10-
## Cost Functions
116

127

138
def cross_entropy(output, target, name=None):

tensorlayer/db.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@
77
"""
88

99
import inspect
10-
import math
1110
import pickle
1211
import time
1312
import uuid
1413
from datetime import datetime
1514

16-
import gridfs
1715
import numpy as np
18-
import pymongo
19-
import tensorflow as tf
20-
import tensorlayer as tl
16+
17+
import gridfs
2118
from pymongo import MongoClient
2219

2320

tensorlayer/distributed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#! /usr/bin/python
22
# -*- coding: utf-8 -*-
3+
34
import json
45
import os
5-
import sys
66
import time
77

88
import tensorflow as tf

tensorlayer/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242

4343
import numpy as np
4444
import tensorflow as tf
45-
from six.moves import cPickle, urllib, zip
45+
from six.moves import cPickle, zip
4646
from tensorflow.python.platform import gfile
4747

48-
from . import nlp, utils, visualize
4948
from . import _logging as logging
49+
from . import nlp, utils, visualize
5050

5151

5252
## Load dataset functions

tensorlayer/layers/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
import numpy as np
66
import tensorflow as tf
7-
from six.moves import xrange
87

9-
from .. import cost, files, iterate, ops, utils, visualize
108
from .. import _logging as logging
9+
from .. import cost, files, iterate, utils, visualize
1110

1211
# __all__ = [
1312
# "Layer",

tensorlayer/layers/extend.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
import numpy as np
4-
import tensorflow as tf
5-
from six.moves import xrange
6-
7-
from . import cost, files, iterate, ops, utils, visualize
83
from .core import *
94

105

tensorlayer/layers/flow_control.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
import numpy as np
4-
import tensorflow as tf
5-
from six.moves import xrange
6-
7-
from . import cost, files, iterate, ops, utils, visualize
83
from .core import *
94

105

@@ -93,4 +88,4 @@ def __init__(self, layers, name='mux_layer'):
9388

9489
self.all_layers = list_remove_repeat(self.all_layers)
9590
self.all_params = list_remove_repeat(self.all_params)
96-
# self.all_drop = list_remove_repeat(self.all_drop)
91+
# self.all_drop = list_remove_repeat(self.all_drop)

tensorlayer/layers/importer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
import numpy as np
4-
import tensorflow as tf
5-
from six.moves import xrange
6-
7-
from . import cost, files, iterate, ops, utils, visualize
83
from tensorflow.python.util.deprecation import deprecated
94
from .core import *
105

tensorlayer/layers/merge.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
import numpy as np
4-
import tensorflow as tf
5-
from six.moves import xrange
6-
7-
from . import cost, files, iterate, ops, utils, visualize
83
from .core import *
94

105

tensorlayer/layers/normalization.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
import numpy as np
4-
import tensorflow as tf
5-
from six.moves import xrange
6-
7-
from . import cost, files, iterate, ops, utils, visualize
83
from .core import *
94

105

0 commit comments

Comments
 (0)