Move evaluator outside of cost layer
Created by: pengwangucla
Current v2 api has evaluator inside of cost layer :
def classification_cost(input,
label,
weight=None,
name=None,
top_k=None,
evaluator=classification_error_evaluator,
layer_attr=None):
This is really wired, why cost layer have such an input, so one must implement a specified type for evaluation.
It is better that evaluator is also a layer, and user can configure outside and connect as a part in the graph. It will be called during test while not called in training.
@reyoung