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, :]
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, :]