ImportError: cannot import name ‘TransformerEncoder‘

求助transformer问题

File "D:\Anaconda\envs\tf1\lib\site-packages\pyitcast\transformer.py", line 12, in __init__
    from torch.nn import TransformerEncoder, TransformerEncoderLayer
ImportError: cannot import name 'TransformerEncoder'

为什么我的torch.nn 无法导入TransformerEncoder呢????

你可能感兴趣的:(深度学习,深度学习,python)