运行程序的时候报了一堆警告,都是关于XXX is deprecated and will be removed……
下面是其中的一个WARNING:
WARNING:tensorflow:From /XXX/XXX/XXX/XXX.py:158 in evaluate.: init (from tensorflow.python.training.summary_io) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.FileWriter. The interface and behavior is the same; this is just a rename.
解决办法:
其实方法很简单,定位到对应的.py文件代码位置,把Please switch to后面那个函数名字替换上去就好了。
比如上面的那个WARNING 就是把原来代码中的tf.train.SummaryWriter 转换为 tf.summary.FileWriter
大家可以去参考一下这篇文章,很实用Tensorflow | 函数名字的更新