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

bash 复制代码
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

bash 复制代码
vim ......ppgan/models/starganv2_model.py
注释掉 # from paddle.fluid.layers.nn import soft_relu
相关推荐
2501_920953861 天前
工业4.0时代,制造企业精益管理咨询的标准化实施步骤
大数据·人工智能·制造
~央千澈~1 天前
《2026鸿蒙NEXT纯血开发与AI辅助》第四章 对鸿蒙next项目结构目录详解以及实战解决一个最初的依赖安装的报错·卓伊凡
人工智能
xinlianyq1 天前
2026企业流量破局:四大主流短视频矩阵获客系统深度解析与选型指南
人工智能·矩阵
workflower1 天前
用硬件换时间”与“用算法降成本”之间的博弈
人工智能·算法·安全·集成测试·无人机·ai编程
AI人工智能+1 天前
施工许可证识别技术:深度融合计算机视觉(CV)与自然语言处理(NLP)
深度学习·计算机视觉·ocr·施工许可证识别
Cx330❀1 天前
一文吃透Linux System V共享内存:原理+实操+避坑指南
大数据·linux·运维·服务器·人工智能
OPHKVPS1 天前
Anthropic 为 Claude Code 推出“自动模式”:AI 编码工具迈向更高自主性
网络·人工智能·安全·ai
Allen_LVyingbo1 天前
斯坦福HAI官网完整版《2025 AI Index Report》全面解读
人工智能·数学建模·开源·云计算·知识图谱
金融小师妹1 天前
基于AI通胀预期建模与能源冲击传导机制的政策分析:高频信号下的风险再评估
人工智能·svn·能源
胡摩西1 天前
当大模型遇上毫米级定位:机器人将拥有“空间思维”?
人工智能·机器人·slam·gps·室内定位·roomaps