(variables)
return hfsize.size(total_params, system=hfsize.alternative)
Get model size.
Get model size.
Get model size .
def model_size(variables):
  """Get model size."""
  total_params = sum(
      [np.prod(var.shape.as_list()) * var.dtype.size for var in variables])
  return hfsize.size(total_params, system=hfsize.alternative)
def model_size ( variables ) : total_params = sum ( [ np . prod ( var . shape . as_list ( ) ) * var . dtype . size for var in variables ] ) return hfsize . size ( total_params , system = hfsize . alternative )