@@ -117,7 +117,7 @@ def get_message_and_key(self):
117
117
return in_m , in_k
118
118
119
119
def model (self , collection , message , key = None ):
120
- """The model for Alice, Bob, and Eve. If key=None, the first FC layer
120
+ """The model for Alice, Bob, and Eve. If key=None, the first fully connected layer
121
121
takes only the message as inputs. Otherwise, it uses both the key
122
122
and the message.
123
123
@@ -206,7 +206,7 @@ def doeval(s, ac, n, itercount):
206
206
itercount: Iteration count label for logging.
207
207
208
208
Returns:
209
- Bob and eve 's loss, as a percent of bits incorrect.
209
+ Bob and Eve 's loss, as a percent of bits incorrect.
210
210
"""
211
211
212
212
bob_loss_accum = 0
@@ -217,7 +217,7 @@ def doeval(s, ac, n, itercount):
217
217
eve_loss_accum += el
218
218
bob_loss_percent = bob_loss_accum / (n * FLAGS .batch_size )
219
219
eve_loss_percent = eve_loss_accum / (n * FLAGS .batch_size )
220
- print ('%d % .2f % .2f' % (itercount , bob_loss_percent , eve_loss_percent ))
220
+ print ('%10d \t %20 .2f\t %20 .2f' % (itercount , bob_loss_percent , eve_loss_percent ))
221
221
sys .stdout .flush ()
222
222
return bob_loss_percent , eve_loss_percent
223
223
@@ -245,7 +245,7 @@ def train_and_evaluate():
245
245
with tf .Session () as s :
246
246
s .run (init )
247
247
print ('# Batch size: ' , FLAGS .batch_size )
248
- print ('# Iter Bob_Recon_Error Eve_Recon_Error' )
248
+ print ('# %10s \t %20s \t %20s' % ( " Iter" , " Bob_Recon_Error" , " Eve_Recon_Error" ) )
249
249
250
250
if train_until_thresh (s , ac ):
251
251
for _ in xrange (EVE_EXTRA_ROUNDS ):
0 commit comments