我想使用DNNClassifier进行网络钓鱼数据集分类。 使用数字列时总是出现错误
feature_c =[tf.feature_column.numeric_column("x", shape=[np.shape(X)[1]])]
classifier = tf.estimator.DNNClassifier(feature_columns=feature_c,
hidden_units=[5,27,3], n_classes=2, model_dir="/tmp/phishing")
InvalidArgumentError错误回溯(最近一次通话) _do_call中的/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py(self,fn,* args) 1355试试: -> 1356返回fn(* args) 1357除了errors.OpError为e: InvalidArgumentError:找到2个根错误。 (0)无效的参数:断言失败:[标签必须> = 0] [条件x> = 0不能按元素进行保存:] [x(dnn / head / ToFloat:0)=] [[-1] [1 ] [1] ...] [[{{node dnn / head / assert_range / assert_non_negative / assert_less_equal / Assert / AssertGuard / Assert}}]]]] [[dnn / head / gradients / dnn / hiddenlayer_0 / BiasAdd_grad / BiasAddGrad / _97]] (1)无效的参数:断言失败:[标签必须> = 0] [条件x> = 0不能按元素进行保存:] [x(dnn / head / ToFloat:0)=] [[-1] [1 ] [1] ...] [[{{node dnn / head / assert_range / assert_non_negative / assert_less_equal / Assert / AssertGuard / Assert}}]]