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
相关推荐
fantasy_arch几秒前
RNN和残差网络模型的差异
网络·人工智能·rnn
极客BIM工作室2 分钟前
Google第六代Trillium TPU详解
人工智能
byzh_rc12 分钟前
[操作系统入门] 零散知识点
人工智能·python·机器学习
技术支持者python,php15 分钟前
物体识别:分类器模型
人工智能·opencv·计算机视觉
良策金宝AI16 分钟前
在一个平台完成查规范+绘图:工程AI如何重构设计工作流?
人工智能·能源·ai助手·工程设计
小马爱打代码18 分钟前
Spring AI:使用 Advisor 组件 - 打印请求大模型出入参日志
java·人工智能·spring
zhaodiandiandian20 分钟前
2025 AI 技术革命:从工具进化到生态重构
人工智能·重构
AI视觉网奇24 分钟前
表情驱动 训练
人工智能·深度学习
百胜软件@百胜软件24 分钟前
财务对账提速80%:高并发场景下的快消网销数据治理实践
大数据·人工智能·零售
一个处女座的程序猿25 分钟前
LLMs之Agents:Graphiti(为 AI 代理构建实时知识图谱)的简介、安装和使用方法、案例应用之详细攻略
人工智能·知识图谱·llms·agents·graphiti