PYTORCH BUG 总结!!!!!!!!!

版权声明:我是小仙女 转载要告诉小仙女哦 https://blog.csdn.net/qq_40210472/article/details/89061454

在这里插入图片描述在这里插入图片描述
1、根据上图中的bug,查找可得,embedding的num_embeddings 是要设置成你的字典的大小,但是要记住,一定是vocab_size + 1,而不是vocab_size,即要设置为字典大小+1。

猜你喜欢

转载自blog.csdn.net/qq_40210472/article/details/89061454