1
我摘錄的有關部分如下:收集輸出()
feature_output = network['output'].find_by_name('fc8').outputs
_, output = trainer.train_minibatch(data, (feature_output))
print(output.keys())
print(output[dict_keys(feature_output]))
如下它給了我一個錯誤:
dict_keys([Output('fc8', [#], [1000])])
Traceback (most recent call last):
File "trainoverfeataccurate.py", line 325, in <module>
warm_up=0, max_epochs=epochs)
File "trainoverfeataccurate.py", line 250, in overfeataccuratetraining
restore, profiling, print_freq=1)
File "trainoverfeataccurate.py", line 145, in train_and_test
print(output[feature_output])
KeyError: (Output('fc8', [#], [1000]),)
我也試過_, output = trainer.train_minibatch(data,{'a' : feature_output})
但它給我以下錯誤 TypeError: cannot convert key of dictionary to N4CNTK8VariableE
使用時收集輸出的正確方法是什麼?