tensorflow/core/framework/allocator.cc:101] Allocation of X exceeds 10% of system memory. 或者 tensorflow.python.framework.errors_impl.InternalError: Dst tensor is not initialized 解决办法:
参考链接:https://github.com/tensorflow/tensorflow/issues/18736#issuecomment-396012638
- 模型太大,如太大的全连接层
- 检查数据类型,用float32代替float64
- 减小batch_size
- 更改优化器,adam/RMSprop优化器会存储历史梯度, 从而double内存消耗
- 安装时尝试采用‘conda install tensorflow(-gpu)’而非’pip install tf’