You need to enable JavaScript to run this app. TensorFlow2.3 GPU下model = Sequential()报EagerVariableNameReuse错误
优惠活动
大模型
产品
解决方案
定价
更多

TensorFlow2.3 GPU下model = Sequential()报EagerVariableNameReuse错误

环境

  • Windows 8.1 64位
  • Python 3.7.7 64位
  • TensorFlow 2.3
  • Keras 2.4
  • CUDA 10.1
  • CuDNN 7

错误信息

InvalidArgumentError: assertion failed: [0] [Op:Assert] name: EagerVariableNameReuse

问题描述

  • GPU运行模式下,仅执行简单的Sequential模型初始化语句 model = Sequential() 就会触发上述错误
  • 不设置CUDA、CuDNN相关环境变量、以非GPU模式运行脚本时,代码可按预期正常运行
  • 已配备GPU硬件,但当前TensorFlow 2.3环境无法调用GPU能力,寻求相关技术解决方案

内容的提问来源于stack exchange,提问作者user2533922

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.11.25 09:36:08