2016-12-15 9 views
0

Я думал, что метод TFlearn evaluate возвращает точность модели (от 0 до 1), но после обучения моя модель model.evaluate(test_x, test_y) возвращает значение> 1 (1.003626), поэтому теперь я не уверен, что я точно понимаю что он возвращает.TFlearn оценить результаты метода значение

Может ли кто-нибудь объяснить?

ответ

0

оценить метод возвращает Dict, так что вызов будет

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 None . 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 None . Note: For classification, label values must be integers representing the class index (i.e. values from 0 to n_classes-1).

Смежные вопросы