主要收集一些遇到的报错和解决办法
报错
illegal instruction
tensorflow-gpu 1.6.0之后的版本要求gpu支持AVX指令集,老版GPU不支持,切换回1.5.0或之前版本
报错
ValueError: Variable hello/rnn/basic_lstm_cell/weights already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at
因为之前的cell kernel还在运行,如果使用的两个不同的cell,用variable scope指明
with tf.variable_scope('forward'):
self.lstm_fw_cell = rnn_cell.BasicLSTMCell(dim_hidden)
with tf.variable_scope('backward'):
self.lstm_bw_cell = rnn_cell.BasicLSTMCell(dim_hidden)
如果使用的是相同的cell,将cell中的reuse设为True

这篇博客汇总了作者在使用TensorFlow过程中遇到的各种报错,包括GPU AVX指令集不支持、变量重用问题、局部变量初始化、模型加载错误等,并提供了相应的解决方法,如回退版本、设置reuse参数、正确初始化变量、使用slim库检查存储变量等。
最低0.47元/天 解锁文章
1383

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



