ImportError: cannot import name ‘soft_relu‘ from ‘paddle.fluid.layers.nn‘

744e3db991ca:$ python run_virtual_human_server.py 
Traceback (most recent call last):
  File "run_virtual_human_server.py", line 14, in <module>
    from AI_Utils import AI
  File "AI_Utils.py", line 18, in <module>
    from AI_modules.first_order_motion.module import FirstOrderMotion
  File "AI_modules/first_order_motion/module.py", line 18, in <module>
    from .model import FirstOrderPredictor
  File "AI_modules/first_order_motion/model.py", line 28, in <module>
    from ppgan.models.generators.occlusion_aware import OcclusionAwareGenerator
  File "lib/python3.9/site-packages/ppgan/models/__init__.py", line 29, in <module>
    from .starganv2_model import StarGANv2Model
  File ".....lib/python3.9/site-packages/ppgan/models/starganv2_model.py", line 5, in <module>
    from paddle.fluid.layers.nn import soft_relu
ImportError: cannot import name 'soft_relu' from 'paddle.fluid.layers.nn' (.....lib/python3.9/site-packages/paddle/fluid/layers/nn.py)

解决方案,仅限wav2lip

vim ......ppgan/models/starganv2_model.py
注释掉 # from paddle.fluid.layers.nn import soft_relu

你可能感兴趣的:(python,Paddle,paddle,深度学习,人工智能)