fastNLP
fastNLP copied to clipboard
版本 1.0.1 No module named 'fastNLP.embeddings.embedding'
在 fastNLP 版本 1.0.1 中
from fastNLP.embeddings.embedding import TokenEmbedding
报错:
ModuleNotFoundError: No module named 'fastNLP.embeddings.embedding'
因为fastNLP 1.0.1版本中我们支持多种深度学习框架,所以在embedding引用时需要加入具体的深度学习框架
from fastNLP.embeddings.torch.embedding import TokenEmbedding