parameters: (self, w, num_partitions)
return_statement: return dim_0_size
docstring: Compute the static size of the first dimension for a sharded variable.
docstring_summary: Compute the static size of the first dimension for a sharded variable.
docstring_tokens: Compute the static size of the first dimension for a sharded variable .
function: def _get_first_dimension_size_statically(self, w, num_partitions):
      """Compute the static size of the first dimension for a sharded variable."""
      dim_0_size = w[0].get_shape()[0]
      for p in range(1, num_partitions):
        dim_0_size += w[p].get_shape()[0]
      return dim_0_size
function_tokens: def _get_first_dimension_size_statically ( self , w , num_partitions ) : dim_0_size = w [ 0 ] . get_shape ( ) [ 0 ] for p in range ( 1 , num_partitions ) : dim_0_size += w [ p ] . get_shape ( ) [ 0 ] return dim_0_size