Skip to content

got two questions about the conv_decoder_fairseq.py #12

@winnechan

Description

@winnechan

I have read your code and it's very help! But I have two little questions:

(1) in the function conv_block, why reverse the second axis of the next_layer?
next_layer = linear_mapping_weightnorm(next_layer[:,-1:,:], self.params["nout_embed"], var_scope_name="linear_mapping_after_cnn")

(2) in the function _create_position_embedding, why there a 2 offset of the pos_embed, is it for the padding?
pe_slice = self.pos_embed[2:maxlen+2, :]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions