我认为TFlearn的evaluate
方法返回模型的精确度(0到1),但训练后我的模型model.evaluate(test_x, test_y)
返回值> 1(1.003626),所以现在我不确定我是否完全理解它返回什么。TFlearn评估方法结果含义
任何人都可以解释一下吗?
我认为TFlearn的evaluate
方法返回模型的精确度(0到1),但训练后我的模型model.evaluate(test_x, test_y)
返回值> 1(1.003626),所以现在我不确定我是否完全理解它返回什么。TFlearn评估方法结果含义
任何人都可以解释一下吗?
的评估方法返回一个字典,所以通话将
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).