tensorflow eager execution 运行问题

问题描述:https://github.com/Goldesel23/Temporal-Ensembling-for-Semi-Supervised-Learning GitHub上一个关于Temporal-Ensembling-for-Semi-Supervised-Learning论文的代码,运用在tensorflow1.4版本更新的eager execution编写,出现每个epoch训练时间逐渐增加以及gpu uti逐渐降低的问题,许多网上的解答为迭代中在graph上增加节点,但是eager execution不存在graph的概念,所以应该不是这个原因。该问题已经挂在https://github.com/tensorflow/tensorflow/issues/23014

问题原因:tf.layers layers leak in eager。

解决方法:replace tf.layers.max_pooling2d with tf.keras.layers.MaxPool2D。

猜你喜欢

转载自blog.csdn.net/Z609834342/article/details/83111403
今日推荐