Evaluator
tflearn.helpers.evaluator.Evaluator (tensors, model=None, session=None)
A class used for performing predictions and evaluate a model performance.
Arguments
- tensors: list of
Tensor
. A list of tensors to perform predictions. - model:
str
. The model weights path (Optional). - session:
Session
. The session to run the prediction (Optional).
Methods
evaluate (feed_dict, ops, batch_size=128)
Evaluate a list of tensors over a whole dataset. Generally, 'ops' argument are average performance metrics (such as average mean, top-3, etc...)
Arguments
- feed_dict:
dict
. The feed dictionary of data. - ops: list of
Tensors
. The tensors to evaluate. - batch_size:
int
. A batch size.
Returns
The mean average result per tensor over all batches.
predict (feed_dict)
Run data through the provided network and return the result value.
Arguments
- feed_dict:
dict
. Feed data dictionary, with placeholders as keys, and data as values.
Returns
An array
. In case of multiple tensors to predict, each tensor's
prediction result is concatenated.