2016-12-15 57 views
0

我认为TFlearn的evaluate方法返回模型的精确度(0到1),但训练后我的模型model.evaluate(test_x, test_y)返回值> 1(1.003626),所以现在我不确定我是否完全理解它返回什么。TFlearn评估方法结果含义

任何人都可以解释一下吗?

回答

0

的评估方法返回一个字典,所以通话将

model.evaluate(test_x, test_y)['accuracy']

但我猜这不是问题。如果您正在进行分类,测试标签必须是整数才能使用。除此之外,没有看到更多的代码,很难调试。从用于源代码

评论评价:

Args: x: Matrix of shape [n_samples, n_features...] or dictionary of many matrices containing the input samples for fitting the model. Can be iterator that returns arrays of features or dictionary of array of features. If set, input_fn must be. y: Vector or matrix [n_samples] or [n_samples, n_outputs] containing the label values (class labels in classification, real numbers in regression) or dictionary of multiple vectors/matrices. Can be iterator that returns array of targets or dictionary of array of targets. If set, input_fn must be. Note: For classification, label values must be integers representing the class index (i.e. values from 0 to n_classes-1).