'Create or get concatenated embedding or softmax variable.
Returns:
a list of self._num_shards Tensors.'

def _get_weights(self):

    num_shards = self._model_hparams.symbol_modality_num_shards
    shards = []
    for i in xrange(num_shards):
        shard_size = ((self._vocab_size // num_shards) + (1 if (i < (self._vocab_size % num_shards)) else 0))
        var_name = ('weights_%d' % i)
        shards.append(tf.get_variable(var_name, [shard_size, self._body_input_depth], initializer=tf.random_normal_initializer(0.0, (self._body_input_depth ** (-0.5)))))
    if (num_shards == 1):
        ret = shards[0]
    else:
        ret = tf.concat(shards, 0)
    ret = eu.ConvertGradientToTensor(ret)
    return ret
