def total_size(context):
  """Return the total size of all relations in their initial encoding."""
  tot = 0
  for r in context.get_relation_names():
    try:
      m = context.get_initial_value(r)
      tot += numpy_size(r, m)
    except KeyError:
      tf.logging.info('skipping uninitialized relation %r' % r)
  return tot
Return the total size of all relations in their initial encoding.
language/nql/demos/gridworld_scaling/scaling_eval.py