Windows上的诗人Tensorflow(再培训开始)

时间:2017-06-07 09:06:02

标签: python windows machine-learning tensorflow

当我按照"How to Retrain Inception's Final Layer for New Categories"的教程进行操作时,我在Windows上运行python retrain.py。我没有对文件retrain.py进行任何更改。创建了近7300个瓶颈文件后,我收到以下错误

Creating bottleneck at /tmp/bottleneck\daisy\9204730092_a7f2182347.jpg.txt
Creating bottleneck at /tmp/bottleneck\daisy\99306615_739eb94b9e_m.jpg.txt
7300 bottleneck files created.
Traceback (most recent call last):
  File "retrain.py", line 930, in <module>
    tf.app.run()
  File "C:\Users\student\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "retrain.py", line 846, in main
    bottleneck_tensor)
  File "retrain.py", line 755, in add_final_training_ops
    variable_summaries(layer_weights, layer_name + '/weights')
  File "retrain.py", line 711, in variable_summaries
    tf.scalar_summary('mean/' + name, mean)
AttributeError: module 'tensorflow' has no attribute 'scalar_summary'

1 个答案:

答案 0 :(得分:2)

您必须使用tf.summary.scalar()而不是tf.scalar_summary。

查找所有此类更新摘要函数的列表here.