def output_layer(self, features, **kwargs):
    'Project features to the vocabulary size.'
    if (self.adaptive_softmax is None):
        if self.share_input_output_embed:
            return F.linear(features, self.embed_tokens.weight)
        else:
            return F.linear(features, self.embed_out)
    else:
        return features
Project features to the vocabulary size.
def output_layer(self, features, **kwargs):
    
    if (self.adaptive_softmax is None):
        if self.share_input_output_embed:
            return F.linear(features, self.embed_tokens.weight)
        else:
            return F.linear(features, self.embed_out)
    else:
        return features