parameters: (mode)
return_statement: return os.path.join(FLAGS.logdir, mode)
docstring: Returns the log directory for the given mode (train or eval).
docstring_summary: Returns the log directory for the given mode (train or eval).
docstring_tokens: Returns the log directory for the given mode ( train or eval ) .
function: def mode_dir(mode):
    """Returns the log directory for the given mode (train or eval)."""
    if mode not in ('train', 'eval'):
      raise ValueError('Invalid mode %r' % mode)
    if not FLAGS.logdir:
      raise ValueError('--logdir not specified')
    return os.path.join(FLAGS.logdir, mode)
function_tokens: def mode_dir ( mode ) : if mode not in ( 'train' , 'eval' ) : raise ValueError ( 'Invalid mode %r' % mode ) if not FLAGS . logdir : raise ValueError ( '--logdir not specified' ) return os . path . join ( FLAGS . logdir , mode )