Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tensorlayer/cost.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# -*- coding: utf-8 -*-

import logging
import numbers

import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.ops import standard_ops

## Cost Functions


def cross_entropy(output, target, name=None):
Expand Down
7 changes: 2 additions & 5 deletions tensorlayer/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@
"""

import inspect
import math
import pickle
import time
import uuid
from datetime import datetime

import gridfs
import numpy as np
import pymongo
import tensorflow as tf
import tensorlayer as tl

import gridfs
from pymongo import MongoClient


Expand Down
2 changes: 1 addition & 1 deletion tensorlayer/distributed.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /usr/bin/python
# -*- coding: utf-8 -*-

import json
import os
import sys
import time

import tensorflow as tf
Expand Down
4 changes: 2 additions & 2 deletions tensorlayer/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@

import numpy as np
import tensorflow as tf
from six.moves import cPickle, urllib, zip
from six.moves import cPickle, zip
from tensorflow.python.platform import gfile

from . import nlp, utils, visualize
from . import _logging as logging
from . import nlp, utils, visualize


## Load dataset functions
Expand Down
3 changes: 1 addition & 2 deletions tensorlayer/layers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

import numpy as np
import tensorflow as tf
from six.moves import xrange

from .. import cost, files, iterate, ops, utils, visualize
from .. import _logging as logging
from .. import cost, files, iterate, utils, visualize

# __all__ = [
# "Layer",
Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/extend.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
7 changes: 1 addition & 6 deletions tensorlayer/layers/flow_control.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


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

self.all_layers = list_remove_repeat(self.all_layers)
self.all_params = list_remove_repeat(self.all_params)
# self.all_drop = list_remove_repeat(self.all_drop)
# self.all_drop = list_remove_repeat(self.all_drop)
5 changes: 0 additions & 5 deletions tensorlayer/layers/importer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from tensorflow.python.util.deprecation import deprecated
from .core import *

Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/merge.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/normalization.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/object_detection.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/padding.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import copy

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/recurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import inspect

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/shape.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
3 changes: 0 additions & 3 deletions tensorlayer/layers/spatial_transformer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/special_activation.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
5 changes: 0 additions & 5 deletions tensorlayer/layers/stack.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .core import *


Expand Down
1 change: 1 addition & 0 deletions tensorlayer/layers/super_resolution.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-

from .core import *


Expand Down
6 changes: 1 addition & 5 deletions tensorlayer/layers/time_distribution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-

import numpy as np
import tensorflow as tf
from six.moves import xrange

from . import cost, files, iterate, ops, utils, visualize
from .. import ops
from .core import *


Expand Down
2 changes: 1 addition & 1 deletion tensorlayer/nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import subprocess
import tempfile
import warnings
from sys import platform as _platform

import numpy as np
import tensorflow as tf
from six.moves import urllib, xrange
from tensorflow.python.platform import gfile

from . import _logging as logging


Expand Down
1 change: 1 addition & 0 deletions tensorlayer/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import tensorflow as tf
import tensorlayer as tl

from . import _logging as logging


Expand Down
6 changes: 0 additions & 6 deletions tensorlayer/prepro.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# -*- coding: utf-8 -*-

import numbers
import os
import random
import re
import sys
import threading
import time
from multiprocessing import Pool

import numpy as np
import scipy
import scipy.ndimage as ndi
import skimage
import tensorflow as tf
import tensorlayer as tl
from scipy import linalg
from scipy.ndimage.filters import gaussian_filter
Expand Down
3 changes: 1 addition & 2 deletions tensorlayer/utils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# -*- coding: utf-8 -*-
import math
import random
import time

import numpy as np
import tensorflow as tf
import tensorlayer as tl

from . import iterate
from . import _logging as logging
from . import iterate


def fit(sess,
Expand Down
2 changes: 1 addition & 1 deletion tensorlayer/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# save/read image(s)
import scipy.misc

from . import prepro
from . import _logging as logging
from . import prepro

# Uncomment the following line if you got: _tkinter.TclError: no display name and no $DISPLAY environment variable
# matplotlib.use('Agg')
Expand Down