weight.size(0) + padding_idx else: padding_idx = -1 if max_norm is not None: # Note [embedding_renorm contiguous] # `embedding_renorm_` will call .contiguous() on input anyways, so we # call it here and take advantage of the improved locality in the # `embedding` call belo...