TensorFlow日常“填坑”记
目录
- Loaded runtime CuDNN library: 7103 (compatibility version 7100) but source was compiled with 7005 (compatibility version 7000).
解决思路:可以降低CuDNN的版本或升级TensorFlow的版本。(实际报错输出也已有提示)
2. tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1787] rhs shape= [2664]
背景:在恢复训练后的NLP相关模型进行测试时,出现错误。
解决思路:词向量矩阵大小在训练和测试是否使用的同一个,即同样大小。有时词向量是根据训练集生成的,但在测试时使用测试集生成,这将可能造成词向量矩阵大小不同。