Skip to content

Commit

Permalink
Format with isort
Browse files Browse the repository at this point in the history
  • Loading branch information
tobegit3hub committed Dec 25, 2017
1 parent 6a14a47 commit b3812e2
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 22 deletions.
8 changes: 4 additions & 4 deletions autoencoder.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env python

from __future__ import division, print_function, absolute_import
from __future__ import absolute_import, division, print_function

import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt

import numpy as np
import tensorflow as tf
# Import MINST data
from tensorflow.examples.tutorials.mnist import input_data

mnist = input_data.read_data_sets("./mnist/", one_hot=True)

# Parameters
Expand Down
3 changes: 2 additions & 1 deletion check_variable_conflict/assign_variable.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env python

import tensorflow as tf
import time

import tensorflow as tf

var1 = tf.Variable(0.0, name="var1")
init_op = tf.initialize_all_variables()
assign_op = tf.assign(var1, 2.0)
Expand Down
3 changes: 2 additions & 1 deletion check_variable_conflict/print_variable.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env python

import tensorflow as tf
import time

import tensorflow as tf

var1 = tf.Variable(0.0, name="var1")
init_op = tf.initialize_all_variables()

Expand Down
2 changes: 1 addition & 1 deletion convolution_network.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data

mnist = input_data.read_data_sets("data/", one_hot=True)
Expand Down
2 changes: 1 addition & 1 deletion distributed_tensorflow/distributed_supervisor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf

# Flags for defining the tf.train.ClusterSpec
tf.app.flags.DEFINE_string("ps_hosts", "",
Expand Down
2 changes: 1 addition & 1 deletion embedding_lookup_demo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf

# 1:1 3:0.7 7:2.5
# 0:1.3 3:0 8:2.8
Expand Down
2 changes: 1 addition & 1 deletion linear_regression.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf

# Prepare train data
train_X = np.linspace(-1, 1, 100)
Expand Down
2 changes: 1 addition & 1 deletion logistic_regression.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data

# Train data
Expand Down
5 changes: 2 additions & 3 deletions lstm_demo.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np

import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.python.ops import rnn, rnn_cell

print("Start to download and extract mnist data")
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

# Parameters
Expand Down
3 changes: 2 additions & 1 deletion mlp.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env python

import tensorflow as tf
import math
import os

import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data

mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

# Define the model
Expand Down
2 changes: 0 additions & 2 deletions multiple_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import tensorflow as tf


import pudb;pudb.set_trace()

number1 = tf.constant(1.5)
Expand All @@ -11,4 +10,3 @@

with tf.Session() as sess:
print(sess.run(add_op))

3 changes: 2 additions & 1 deletion neural_network.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf

import input_data


Expand Down
2 changes: 1 addition & 1 deletion polynomial_regression.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf

# Prepare train data
train_X = np.linspace(-1, 1, 100)
Expand Down
1 change: 1 addition & 0 deletions resnet/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys

import numpy as np
import tensorflow as tf

Expand Down
5 changes: 3 additions & 2 deletions resnet/train.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import cPickle

import numpy as np
import tensorflow as tf

import model


Expand Down
2 changes: 1 addition & 1 deletion test_tensorflow.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import tensorflow as tf
import numpy as np
import tensorflow as tf

train_X = np.linspace(-1, 1, 100)
train_Y = 2 * train_X + np.random.randn(*train_X.shape) * 0.33 + 10
Expand Down

0 comments on commit b3812e2

Please sign in to comment.