@@ -55,15 +55,16 @@ def train():
5555 is_train = False ,
5656 batch_size =  BATCH_SIZE ,
5757 shuffle = False )
58+ 59+  x  =  tf .placeholder (tf .float32 , shape = [BATCH_SIZE , IMG_W , IMG_H , 3 ])
60+  y_  =  tf .placeholder (tf .int16 , shape = [BATCH_SIZE , N_CLASSES ]) 
5861
59-  logits  =  VGG .VGG16N (tra_image_batch , N_CLASSES , IS_PRETRAIN )
60-  loss  =  tools .loss (logits , tra_label_batch )
61-  accuracy  =  tools .accuracy (logits , tra_label_batch )
62-  my_global_step  =  tf .Variable (0 , name = 'global_step' , trainable = False ) 
63-  train_op  =  tools .optimize (loss , learning_rate , my_global_step )
62+  logits  =  VGG .VGG16N (x , N_CLASSES , IS_PRETRAIN )
63+  loss  =  tools .loss (logits , y_ )
64+  accuracy  =  tools .accuracy (logits , y_ )
6465
65-  x  =  tf .placeholder ( tf . float32 ,  shape = [ BATCH_SIZE ,  IMG_W ,  IMG_H ,  3 ]) 
66-  y_  =  tf . placeholder ( tf . int16 ,  shape = [ BATCH_SIZE ,  N_CLASSES ])   
66+  my_global_step  =  tf .Variable ( 0 ,  name = 'global_step' ,  trainable = False )  
67+  train_op  =  tools . optimize ( loss ,  learning_rate ,  my_global_step )  
6768
6869 saver  =  tf .train .Saver (tf .global_variables ())
6970 summary_op  =  tf .summary .merge_all () 
0 commit comments