hi:
I find there is no 'SOS' in code, I understand SOS should be embedding at the beginning.
Please tell me ,thanks!
---------------code-----------------------------------------------
class Encoder(nn.Module):
def init(self, hidden_dim, voc, char2id, id2char):
super(Encoder, self).init()
self.hidden_dim = hidden_dim
self.vocab_size = len(voc)
self.START_TOKEN = char2id['EOS']
self.emb = nn.Embedding(self.vocab_size, self.hidden_dim)
self.att = MultiHeadAttentionLayer(self.hidden_dim, 8)
hi: I find there is no 'SOS' in code, I understand SOS should be embedding at the beginning. Please tell me ,thanks! ---------------code----------------------------------------------- class Encoder(nn.Module): def init(self, hidden_dim, voc, char2id, id2char): super(Encoder, self).init() self.hidden_dim = hidden_dim self.vocab_size = len(voc) self.START_TOKEN = char2id['EOS'] self.emb = nn.Embedding(self.vocab_size, self.hidden_dim) self.att = MultiHeadAttentionLayer(self.hidden_dim, 8)