HAMA-760: fix the bug of cross entropy
HAMA-760: add regularization