77
88from __future__ import division , print_function , absolute_import
99
10- from tensorgraph .layers import Conv2D , RELU , MaxPooling , LRN , Tanh , Dropout , \
10+ from tensorgraphx .layers import Conv2D , RELU , MaxPooling , LRN , Tanh , Dropout , \
1111 Softmax , Flatten , Linear , AvgPooling , \
1212 Lambda , BatchNormalization , IdentityBlock , \
1313 TransitionLayer , DenseNet
14- from tensorgraph .utils import same , valid , same_nd , valid_nd
15- import tensorgraph as tg
14+ from tensorgraphx .utils import same , valid , same_nd , valid_nd
15+ import tensorgraphx as tg
1616import tensorflow as tf
17- from tensorgraph .cost import entropy , accuracy , mse
18- from tensorgraph .dataset import Mnist , Cifar10
17+ from tensorgraphx .cost import entropy , accuracy , mse
18+ from tensorgraphx .dataset import Mnist , Cifar10
1919from tensorflow .python .framework import ops
2020import numpy as np
2121
@@ -158,7 +158,7 @@ def train():
158158
159159
160160def train_with_trainobject ():
161- from tensorgraph .trainobject import train as mytrain
161+ from tensorgraphx .trainobject import train as mytrain
162162 config = tf .ConfigProto ()
163163 config .gpu_options .allow_growth = True
164164 with tf .Session (config = config ) as sess :
@@ -187,7 +187,7 @@ def train_with_trainobject():
187187
188188
189189def train_with_VGG ():
190- from tensorgraph .trainobject import train as mytrain
190+ from tensorgraphx .trainobject import train as mytrain
191191 config = tf .ConfigProto ()
192192 config .gpu_options .allow_growth = True
193193 with tf .Session (config = config ) as sess :
@@ -196,7 +196,7 @@ def train_with_VGG():
196196 _ , nclass = y_train .shape
197197 print ('X max' , np .max (X_train ))
198198 print ('X min' , np .min (X_train ))
199- from tensorgraph .layers import VGG19
199+ from tensorgraphx .layers import VGG19
200200 seq = tg .Sequential ()
201201 layer = VGG19 (input_channels = c , input_shape = (h ,w ))
202202 seq .add (layer )
@@ -223,7 +223,7 @@ def train_with_VGG():
223223
224224
225225def train_with_Resnet ():
226- from tensorgraph .trainobject import train as mytrain
226+ from tensorgraphx .trainobject import train as mytrain
227227 config = tf .ConfigProto ()
228228 config .gpu_options .allow_growth = True
229229 with tf .Session (config = config ) as sess :
@@ -268,7 +268,7 @@ def train_with_Resnet():
268268
269269
270270def train_with_Densenet ():
271- from tensorgraph .trainobject import train as mytrain
271+ from tensorgraphx .trainobject import train as mytrain
272272 config = tf .ConfigProto ()
273273 config .gpu_options .allow_growth = True
274274 with tf .Session (config = config ) as sess :
0 commit comments