-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtask.py
More file actions
31 lines (23 loc) · 738 Bytes
/
task.py
File metadata and controls
31 lines (23 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# encoding: utf-8
from tensorflow.python.platform import gfile
import tensorflow as tf
import Network
import time
current_time = time.strftime("%Y-%m-%d--%H-%M-%S", time.gmtime())
def train():
network = Network.Network()
network.train()
def main(argv=None):
if not gfile.Exists("./train"):
gfile.MakeDirs("./train")
if not gfile.Exists("./test"):
gfile.MakeDirs("./test")
if not gfile.Exists(Network.PREDICT_DIR):
gfile.MakeDirs(Network.PREDICT_DIR)
if not gfile.Exists(Network.CHECKPOINT_DIR):
gfile.MakeDirs(Network.CHECKPOINT_DIR)
if not gfile.Exists(Network.LOGS_DIR):
gfile.MakeDirs(Network.LOGS_DIR)
train()
if __name__ == '__main__':
tf.app.run()