Skip to content

Commit 854da80

Browse files
committed
run yapf and isort.
1 parent 46eeca1 commit 854da80

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

example/tutorial_mnist_distributed.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import tensorflow as tf
1515
import tensorlayer as tl
1616

17-
1817
# load environment for distributed training
1918
task_spec = tl.distributed.TaskSpec()
2019
task_spec.create_server()

tensorlayer/utils.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# -*- coding: utf-8 -*-
2+
import os
23
import random
4+
import subprocess
5+
import sys
36
import time
7+
from contextlib import contextmanager
8+
from sys import exit as _exit
9+
from sys import platform as _platform
410

511
import numpy as np
612
import tensorflow as tf
@@ -9,13 +15,6 @@
915
from . import _logging as logging
1016
from . import iterate
1117

12-
import os
13-
import subprocess
14-
import sys
15-
from contextlib import contextmanager
16-
from sys import exit as _exit
17-
from sys import platform as _platform
18-
1918

2019
def fit(sess,
2120
network,
@@ -535,8 +534,7 @@ def exit_tensorflow(sess=None, port=6006):
535534
_exit()
536535
elif _platform == "darwin":
537536
logging.info('OS X: %s' % text)
538-
subprocess.Popen("lsof -i tcp:" + str(port) + " | grep -v PID | awk '{print $2}' | xargs kill",
539-
shell=True) # kill tensorboard
537+
subprocess.Popen("lsof -i tcp:" + str(port) + " | grep -v PID | awk '{print $2}' | xargs kill", shell=True) # kill tensorboard
540538
elif _platform == "win32":
541539
logging.info(text2 + "Windows")
542540
# TODO

0 commit comments

Comments
 (0)