@@ -106,9 +106,9 @@ def trainNetwork(s, readout, h_fc1, sess):
106106 checkpoint = tf .train .get_checkpoint_state ("saved_networks" )
107107 if checkpoint and checkpoint .model_checkpoint_path :
108108 saver .restore (sess , checkpoint .model_checkpoint_path )
109- print "Successfully loaded:" , checkpoint .model_checkpoint_path
109+ print ( "Successfully loaded:" , checkpoint .model_checkpoint_path )
110110 else :
111- print "Could not find old network weights"
111+ print ( "Could not find old network weights" )
112112
113113 epsilon = INITIAL_EPSILON
114114 t = 0
@@ -119,7 +119,7 @@ def trainNetwork(s, readout, h_fc1, sess):
119119 action_index = 0
120120 if t % FRAME_PER_ACTION == 0 :
121121 if random .random () <= epsilon :
122- print "----------Random Action----------"
122+ print ( "----------Random Action----------" )
123123 action_index = random .randrange (ACTIONS )
124124 a_t [random .randrange (ACTIONS )] = 1
125125 else :
@@ -189,9 +189,9 @@ def trainNetwork(s, readout, h_fc1, sess):
189189 else :
190190 state = "train"
191191
192- print "TIMESTEP" , t , "/ STATE" , state , \
192+ print ( "TIMESTEP" , t , "/ STATE" , state , \
193193 "/ EPSILON" , epsilon , "/ ACTION" , action_index , "/ REWARD" , r_t , \
194- "/ Q_MAX %e" % np .max (readout_t )
194+ "/ Q_MAX %e" % np .max (readout_t ))
195195 # write info to files
196196 '''
197197 if t % 10000 <= 100:
0 commit comments