You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I changed line 46 to self.token_to_id = dict((k, self.full_token_to_id[k]) for k in list(self.full_token_to_id.keys())[:max_vocabulary_size])
But still got the error:
44 full_token_and_id = zip(vocabulary, range(len(vocabulary)))
45 self.full_token_to_id = dict(full_token_and_id)
---> 46 self.token_to_id = dict((k, self.full_token_to_id[k]) for k in list(self.full_token_to_id.keys())[:max_vocabulary_size])
47
48 self.id_to_token = {v: k for k, v in self.token_to_id.items()}
TypeError: 'zip' object is not subscriptable
The text was updated successfully, but these errors were encountered:
I have the same problem as here
I changed line 46 to self.token_to_id = dict((k, self.full_token_to_id[k]) for k in list(self.full_token_to_id.keys())[:max_vocabulary_size])
But still got the error:
The text was updated successfully, but these errors were encountered: