1
我使用jupyter筆記本來編寫深度神經網絡代碼。嘗試創建DNNClassifier時遇到此問題。tensorflow.contrib.learn.DNNclassifier缺少1個必需的位置參數:'feature_columns'
import tensorflow.contrib.learn as learn
classifier = learn.DNNClassifier(hidden_units=[10, 20, 10], n_classes=2)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-0273d6847e2b> in <module>()
----> 1 classifier = learn.DNNClassifier(hidden_units=[10, 20, 10], n_classes=2)
TypeError: __init__() missing 1 required positional argument: 'feature_columns'