前提・実現したいこと
kerasから変換して使うのではなく、もう1回tensorflowで画像分類の学習をしようしたときのエラー
python
1TypeError: Expected DataType for argument 'dtype' not <tf.Tensor 'module_apply_default/hub_output/feature_vector/SpatialSqueeze:0' shape=(None, 2048) dtype=float32>.
発生している問題・エラーメッセージ
python
1Traceback (most recent call last): 2 File "C:\Users\xxx\Desktop\python\tinn\retrain.py", line 1331, in <module> 3 tf.compat.v1.app.run(main=main, argv=[sys.argv[0]] + unparsed) 4 File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run 5 _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) 6 File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\app.py", line 299, in run 7 _run_main(main, args) 8 File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\app.py", line 250, in _run_main 9 sys.exit(main(argv)) 10 File "C:\Users\xxx\Desktop\python\tinn\retrain.py", line 1022, in main 11 ground_truth_input, final_tensor) = add_final_retrain_ops( 12 File "C:\Users\xxx\Desktop\python\tinn\retrain.py", line 746, in add_final_retrain_ops 13 bottleneck_input = tf.compat.v1.placeholder(bottleneck_tensor, shape=[batch_size, bottleneck_tensor_size], name='BottleneckInputPlaceholder') 14 File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\ops\array_ops.py", line 3026, in placeholder 15 return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name) 16 File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 6671, in placeholder 17 dtype = _execute.make_type(dtype, "dtype") 18 File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\eager\execute.py", line 195, in make_type 19 raise TypeError("Expected DataType for argument '%s' not %s." % 20TypeError: Expected DataType for argument 'dtype' not <tf.Tensor 'module_apply_default/hub_output/feature_vector/SpatialSqueeze:0' shape=(None, 2048) dtype=float32>.
補足情報(FW/ツールのバージョンなど)
tensorflow 2.2.0
Keras 2.3.1
windows 10
あなたの回答
tips
プレビュー