训练gpt2时出现的问题,报错信息如下图所示:

详细信息为:
ValueError: Variable model/wpe already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
解决方法:
每次训练前加上如下两行命令即可。
import tensorflow as tf
tf.reset_default_graph()
参考资料:

博客主要讲述了训练GPT2时遇到的报错问题,报错信息为变量已存在不被允许,询问是否要设置重用。解决办法是每次训练前添加两行命令,还给出了参考资料链接。
2095

被折叠的 条评论
为什么被折叠?



