оценить метод возвращает 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).