jiangyiqiao / fundus_transfer_v3_classification

谷歌INCEPTION-RESNET-V3迁移学习实现图像二分类判断图像是否生病
17 stars 5 forks source link

TypeError: Expected string passed to parameter 'tags' of op 'ScalarSummary', got 'loss' of type 'str' instead. #3

Open zhjikoshlizhzc opened 5 years ago

zhjikoshlizhzc commented 5 years ago

小姐姐你好!我遇到一个问题。 TypeError: Expected string passed to parameter 'tags' of op 'ScalarSummary', got 'loss' of type 'str' instead. 这个问题我在你参考的五种花分类中同样遇到了,但是没有找到解决办法。 详细错误如下: Traceback (most recent call last):

File "", line 1, in runfile('D:/Graduate/fundus_transfer_v3_classification-master/train.py', wdir='D:/Graduate/fundus_transfer_v3_classification-master')

File "C:\Users\acer\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile execfile(filename, namespace)

File "C:\Users\acer\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/Graduate/fundus_transfer_v3_classification-master/train.py", line 313, in tf.app.run()

File "C:\Users\acer\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv))

File "D:/Graduate/fundus_transfer_v3_classification-master/train.py", line 238, in main loss_summary = tf.summary.scalar('loss', cross_entropy_mean)

File "C:\Users\acer\Anaconda3\lib\site-packages\tensorflow\python\summary\summary.py", line 80, in scalar val = _gen_logging_ops.scalar_summary(tags=tag, values=tensor, name=scope)

File "C:\Users\acer\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_logging_ops.py", line 794, in scalar_summary "ScalarSummary", tags=tags, values=values, name=name)

File "C:\Users\acer\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 520, in _apply_op_helper repr(values), type(values).name))

TypeError: Expected string passed to parameter 'tags' of op 'ScalarSummary', got 'loss' of type 'str' instead.

realTaki commented 5 years ago

大佬解决这个问题了么,我也出现了一样的报错